diff --git a/plugins/org.etsi.mts.tdl.model/library/predefined.tdl b/plugins/org.etsi.mts.tdl.model/library/predefined.tdl index 586a3d5ed9490d8090814896f3cbf0b4639ef4a9..a8fbf71fb7cf1c8050de895c9dffe6ac4b00282b 100644 --- a/plugins/org.etsi.mts.tdl.model/library/predefined.tdl +++ b/plugins/org.etsi.mts.tdl.model/library/predefined.tdl @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="ASCII"?> -<tdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdl="http://www.etsi.org/spec/TDL/1.4.1" name="Standard"> +<tdl:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tdl="http://www.etsi.org/spec/TDL/1.4.1" name="TDL"> <packagedElement xsi:type="tdl:ConstraintType" name="length"/> <packagedElement xsi:type="tdl:ConstraintType" name="range"/> <packagedElement xsi:type="tdl:ConstraintType" name="format"/> diff --git a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxFileTemplateProvider.xtend b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxFileTemplateProvider.xtend index 3c68a8f9cc1fd7c6b355d489dbe596cf5955df27..b2bc99e88e6f80ead8c97dca54590a128c5b0780 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxFileTemplateProvider.xtend +++ b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxFileTemplateProvider.xtend @@ -50,8 +50,8 @@ final class TDLtxFile { final class TDLtxLibrary { //TODO: make it more sensible //TODO: name should not be asked for... - val name = text("Name:", "Standard") - val packageName = combo("Library:", #["Standard", "HTTP"], "The library to be added.") + val name = text("Name:", "TDL") + val packageName = combo("Library:", #["TDL", "HTTP"], "The library to be added.") var validated = false override protected updateVariables() { diff --git a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProject.xtend b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProject.xtend index 0f446b33c35d986d62fafbc1fd486a5d3250bf84..755d37647fca9f7e12e7b666f0cc06434423a2df 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProject.xtend +++ b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProject.xtend @@ -29,7 +29,7 @@ final class TDLtxProject { val name = text("Main Package Name:", "Main", "The name of the main package") val path = text("Path:", "tdl", "The package path to place the files in", advancedGroup) //TODO: add other options - val importStandard = check("Import Standard Library", true, "Import TDL standard library definitions.", advancedGroup) + val importStandard = check("Import TDL Library", true, "Import TDL standard library definitions.", advancedGroup) val importHTTP = check("Import HTTP Library", false, "Import TDL HTTP library definitions.", advancedGroup) val extendedNature = check("Add additional natures", false, "Add Eclipse Plug-in and Java natures", advancedGroup) @@ -74,8 +74,8 @@ final class TDLtxProject { //TODO: remove hardcoded import var imports = "" if (importStandard.value) { - addFile('''src/«path»/Standard.tdltx''', TemplateHelper.getLibrary("Standard")) - imports += "Import all from Standard\n" + addFile('''src/«path»/TDL.tdltx''', TemplateHelper.getLibrary("TDL")) + imports += "Import all from TDL\n" } if (importHTTP.value) { addFile('''src/«path»/HTTP.tdltx''', TemplateHelper.getLibrary("HTTP")) diff --git a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectBase.xtend b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectBase.xtend index 465b544fff1b99b0706176f6e64406a1bf6200a0..4f384274921f0bf5b75b0f3204e7bddb8443bdf6 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectBase.xtend +++ b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectBase.xtend @@ -29,7 +29,7 @@ final class TDLtxProjectBase { val name = text("Main Package Name:", "Main", "The name of the main package") val path = text("Path:", "tdl", "The package path to place the files in", advancedGroup) //TODO: add other options - val importStandard = check("Import Standard Library", true, "Import TDL standard library definitions.", advancedGroup) + val importStandard = check("Import TDL Library", true, "Import TDL standard library definitions.", advancedGroup) val importHTTP = check("Import HTTP Library", false, "Import TDL HTTP library definitions.", advancedGroup) val extendedNature = check("Add additional natures", false, "Add Eclipse Plug-in and Java natures", advancedGroup) @@ -74,8 +74,8 @@ final class TDLtxProjectBase { //TODO: remove hardcoded import var imports = "" if (importStandard.value) { - addFile('''src/«path»/Standard.tdltx''', TemplateHelper.getLibrary("Standard")) - imports += "Import all from Standard\n" + addFile('''src/«path»/TDL.tdltx''', TemplateHelper.getLibrary("TDL")) + imports += "Import all from TDL\n" } if (importHTTP.value) { addFile('''src/«path»/HTTP.tdltx''', TemplateHelper.getLibrary("HTTP")) diff --git a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectWithOpenAPI.xtend b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectWithOpenAPI.xtend index 35fb43aa9af42e848f3db830a2a4fa52513c2442..2bc04505f17a6e628ac45cd8a0c1b5ef59f3a684 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectWithOpenAPI.xtend +++ b/plugins/org.etsi.mts.tdl.tx.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxProjectWithOpenAPI.xtend @@ -39,7 +39,7 @@ final class TDLtxProjectWithOpenAPI { // val name = combo("Package Name:", #["Example", "Sample", "Tutorial", "Pack"], "The name of the package", advancedGroup) val name = text("Main Package Name:", "Main", "The name of the main package") //TODO: add other options - val importStandard = check("Import Standard Library", true, "Import TDL standard library definitions.", advancedGroup) + val importStandard = check("Import TDL Library", true, "Import TDL standard library definitions.", advancedGroup) val importHTTP = check("Import HTTP Library", false, "Import TDL HTTP library definitions.", advancedGroup) val extendedNature = check("Add additional natures", false, "Add Eclipse Plug-in and Java natures", advancedGroup) val path = text("Path:", "tdl", "The package path to place the files in", advancedGroup) @@ -99,8 +99,8 @@ final class TDLtxProjectWithOpenAPI { //TODO: remove hardcoded import var imports = "" if (importStandard.value) { - addFile('''src/«path»/Standard.tdltx''', TemplateHelper.getLibrary("Standard")) - imports += "Import all from Standard\n" + addFile('''src/«path»/TDL.tdltx''', TemplateHelper.getLibrary("TDL")) + imports += "Import all from TDL\n" } if (importHTTP.value) { addFile('''src/«path»/HTTP.tdltx''', TemplateHelper.getLibrary("HTTP")) @@ -120,7 +120,7 @@ final class TDLtxProjectWithOpenAPI { * This is an example package */ Package «name» { - Import all from Standard + Import all from TDL Import all from «importsName» Type simple } diff --git a/plugins/org.etsi.mts.tdl.tx.ui/templates/HTTP.tdltx b/plugins/org.etsi.mts.tdl.tx.ui/templates/HTTP.tdltx index b1a4f2f0302a374641989f934db04e6e73cee91d..23faf1d0c8cecb2d17b40ae266f3d6dc69d21464 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/templates/HTTP.tdltx +++ b/plugins/org.etsi.mts.tdl.tx.ui/templates/HTTP.tdltx @@ -12,10 +12,11 @@ Package HTTP { connect client::http to server::http } - } Note : "Message based types and instances" + } + Note : "Message based types and instances" Package MessageBased { - Import all from Standard + Import all from TDL //Generic Method type -> required for generation!!! Enumerated Method { @@ -76,22 +77,19 @@ Package HTTP { String ^name, String ^value ) - Type Location - Location path - Location query - - //may need a structure, not necessarily relevant in standardized testing - Location cookie + Enumerated Location { + Location path, + Location query, + //may need a structure, not necessarily relevant in standardized testing + Location cookie + } + + Annotation QueryParameters - //separate headers -> not necessary - //Location header; Collection Headers of Header Structure Header ( String ^name, String ^value - //not relevant in TDL? - //optional contentLength of type Integer, - //optional contentType of type String ) //Base body for extension diff --git a/plugins/org.etsi.mts.tdl.tx.ui/templates/Standard.tdltx b/plugins/org.etsi.mts.tdl.tx.ui/templates/TDL.tdltx similarity index 98% rename from plugins/org.etsi.mts.tdl.tx.ui/templates/Standard.tdltx rename to plugins/org.etsi.mts.tdl.tx.ui/templates/TDL.tdltx index 9af8d103a1d6978b245383e27b367805df797040..38829c358676ab4e79cd0d7cf73da571544bc05a 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/templates/Standard.tdltx +++ b/plugins/org.etsi.mts.tdl.tx.ui/templates/TDL.tdltx @@ -1,4 +1,4 @@ -Package Standard { +Package TDL { //TODO: extract to standard library Constraint length Constraint minLength diff --git a/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xml b/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xml index 9b51117ffec6756058d9675a07b4cc111228a476..fa5eee19c7925bcc1dffad0429695846c4a3c8eb 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xml +++ b/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xml @@ -128,8 +128,8 @@ with { } } -</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package including import from Standard" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package.-.Include.Standard.import" name="Package - Include Standard import">Package ${packageName} { - Import all from Standard +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package including import from TDL" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package.-.Include.TDL.import" name="Package - Include TDL import">Package ${packageName} { + Import all from TDL ${cursor} }</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParallelBehaviour" deleted="false" description="Parallel Behaviour with three or more Blocks" enabled="true" id="org.etsi.mts.tdl.tx.templates.Parallel.Behaviour.with.three.or.more.Blocks" name="Parallel Behaviour with three or more Blocks">run { ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} diff --git a/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xmlback b/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xmlback index 9801be16b2852be02bc72285e8ad5d2fee8a5f9b..90997a7d37251934dbb670d7772d530f71d453c9 100644 --- a/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xmlback +++ b/plugins/org.etsi.mts.tdl.tx.ui/templates/templates.xmlback @@ -128,8 +128,8 @@ with { } } -</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package including import from Standard" enabled="true" name="Package - Include Standard import">Package ${packageName} { - Import all from Standard +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package including import from TDL" enabled="true" name="Package - Include TDL import">Package ${packageName} { + Import all from TDL ${cursor} }</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParallelBehaviour" deleted="false" description="Parallel Behaviour with three or more Blocks" enabled="true" name="Parallel Behaviour with three or more Blocks">run { ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)}