diff --git a/plugins/org.etsi.mts.tdl.txi.ui/META-INF/MANIFEST.MF b/plugins/org.etsi.mts.tdl.txi.ui/META-INF/MANIFEST.MF index dc5494a6da715415d37327a9cce96139f521be04..d5ff7998d3539ae4f7bbfbbd84d620d522ef3cb7 100644 --- a/plugins/org.etsi.mts.tdl.txi.ui/META-INF/MANIFEST.MF +++ b/plugins/org.etsi.mts.tdl.txi.ui/META-INF/MANIFEST.MF @@ -17,10 +17,15 @@ Require-Bundle: org.etsi.mts.tdl.txi, org.eclipse.ui.ide;bundle-version="3.5.0", org.eclipse.ui, org.eclipse.compare, - org.eclipse.xtext.builder + org.eclipse.xtext.builder, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.xtend.lib, + org.eclipse.ui.forms Import-Package: org.apache.log4j Bundle-RequiredExecutionEnvironment: JavaSE-11 Export-Package: org.etsi.mts.tdl.ui.contentassist, org.etsi.mts.tdl.txi.ui.internal, - org.etsi.mts.tdl.ui.quickfix + org.etsi.mts.tdl.ui.quickfix, + org.etsi.mts.tdl.ui.wizard Bundle-Activator: org.etsi.mts.tdl.txi.ui.internal.TxiActivator diff --git a/plugins/org.etsi.mts.tdl.txi.ui/build.properties b/plugins/org.etsi.mts.tdl.txi.ui/build.properties index 323f56c513d04a1e0ba18fe2dad51f354dcb3201..183cbda20fb0c86f1a623e495acfbaa55e6a3434 100644 --- a/plugins/org.etsi.mts.tdl.txi.ui/build.properties +++ b/plugins/org.etsi.mts.tdl.txi.ui/build.properties @@ -3,5 +3,7 @@ source.. = src/,\ xtend-gen/ bin.includes = .,\ META-INF/,\ - plugin.xml + plugin.xml,\ + templates/,\ + icons/ bin.excludes = **/*.xtend diff --git a/plugins/org.etsi.mts.tdl.txi.ui/icons/file_template.png b/plugins/org.etsi.mts.tdl.txi.ui/icons/file_template.png new file mode 100644 index 0000000000000000000000000000000000000000..0c639178969b785c8d4e05ee4f6d23d88613cf47 Binary files /dev/null and b/plugins/org.etsi.mts.tdl.txi.ui/icons/file_template.png differ diff --git a/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_file.png b/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_file.png new file mode 100644 index 0000000000000000000000000000000000000000..4bd4eadb2439f0f12bde6a3c728e7d0ff24b79cb Binary files /dev/null and b/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_file.png differ diff --git a/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_proj.gif b/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_proj.gif new file mode 100644 index 0000000000000000000000000000000000000000..984bc91396e28d92b957e4661e1b6249caecca6f Binary files /dev/null and b/plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_proj.gif differ diff --git a/plugins/org.etsi.mts.tdl.txi.ui/icons/project_template.png b/plugins/org.etsi.mts.tdl.txi.ui/icons/project_template.png new file mode 100644 index 0000000000000000000000000000000000000000..fddcb8c4edba947a86eb4892ab4fc90dc31922a1 Binary files /dev/null and b/plugins/org.etsi.mts.tdl.txi.ui/icons/project_template.png differ diff --git a/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml b/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml index f6ed619f2a33e8462a5c323b06051f50f346cf35..45a746fc6f481ae43d71ae073e6dcc23e380e7bd 100644 --- a/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml +++ b/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml @@ -12,7 +12,14 @@ name="TDLtxi Editor"> </editor> </extension> - <extension + <extension point="org.eclipse.e4.ui.css.swt.theme"> + <stylesheet uri="css/e4-dark_tdltxi_syntaxhighlighting.css"> + <themeid + refid="org.eclipse.e4.ui.css.theme.e4_dark"> + </themeid> + </stylesheet> + </extension> + <extension point="org.eclipse.ui.handlers"> <handler class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" @@ -431,4 +438,105 @@ type="text"> </fileTypes> </extension> + <extension + point="org.eclipse.ui.newWizards"> + <category id="org.etsi.mts.tdl.ui.category" name="TDLtxi"> + </category> + <wizard + category="org.etsi.mts.tdl.ui.category" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewProjectWizard" + id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard" + name="TDLtxi Project" + icon="icons/new_TDLtxi_proj.gif" + project="true"> + </wizard> + </extension> + <extension + point="org.eclipse.xtext.ui.projectTemplate"> + <projectTemplateProvider + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxiProjectTemplateProvider" + grammarName="org.etsi.mts.tdl.TDLtxi"> + </projectTemplateProvider> + </extension> + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"/> + </perspectiveExtension> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipse.ui.main.toolbar"> + <toolbar + id="org.etsi.mts.tdl.ui.toolbar"> + <!-- + For some reason the tooltip is not shown when hovering over the toolbar button + See also https://www.eclipse.org/forums/index.php/t/1079111/ + --> + <command + commandId="org.eclipse.ui.newWizard" + tooltip="Create a new TDLtxi project"> + <parameter + name="newWizardId" + value="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"> + </parameter> + </command> + </toolbar> + </menuContribution> + </extension> + <extension + point="org.eclipse.ui.newWizards"> + <category id="org.etsi.mts.tdl.ui.category" name="TDLtxi"> + </category> + <wizard + category="org.etsi.mts.tdl.ui.category" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewFileWizard" + id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard" + name="TDLtxi File" + icon="icons/new_TDLtxi_file.png"> + </wizard> + </extension> + <extension + point="org.eclipse.xtext.ui.fileTemplate"> + <fileTemplateProvider + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxiFileTemplateProvider" + grammarName="org.etsi.mts.tdl.TDLtxi"> + </fileTemplateProvider> + </extension> + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"/> + </perspectiveExtension> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipse.ui.main.toolbar"> + <toolbar + id="org.etsi.mts.tdl.ui.toolbar"> + <!-- + For some reason the tooltip is not shown when hovering over the toolbar button + See also https://www.eclipse.org/forums/index.php/t/1079111/ + --> + <command + commandId="org.eclipse.ui.newWizard" + tooltip="Create a new TDLtxi file"> + <parameter + name="newWizardId" + value="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"> + </parameter> + </command> + </toolbar> + </menuContribution> + </extension> </plugin> diff --git a/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml_gen b/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml_gen new file mode 100644 index 0000000000000000000000000000000000000000..15dd86d4f97215529194538c6a6f37cc9fe79941 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/plugin.xml_gen @@ -0,0 +1,535 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension + point="org.eclipse.ui.editors"> + <editor + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" + contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" + default="true" + extensions="tdltxi" + id="org.etsi.mts.tdl.TDLtxi" + name="TDLtxi Editor"> + </editor> + </extension> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" + commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> + <activeWhen> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </activeWhen> + </handler> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" + commandId="org.etsi.mts.tdl.TDLtxi.validate"> + <activeWhen> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </activeWhen> + </handler> + <!-- copy qualified name --> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> + <activeWhen> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened" /> + </activeWhen> + </handler> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" + commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> + <activeWhen> + <and> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.core.expressions.definitions"> + <definition id="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + <and> + <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.etsi.mts.tdl.TDLtxi" + forcePluginActivation="true"/> + </with> + </and> + </definition> + <definition id="org.etsi.mts.tdl.TDLtxi.XtextEditor.opened"> + <and> + <reference definitionId="isXtextEditorActive"/> + <with variable="activeEditor"> + <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" + value="org.etsi.mts.tdl.TDLtxi" + forcePluginActivation="true"/> + </with> + </and> + </definition> + </extension> + <extension + point="org.eclipse.ui.preferencePages"> + <page + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.etsi.mts.tdl.TDLtxi" + name="TDLtxi"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" + id="org.etsi.mts.tdl.TDLtxi.coloring" + name="Syntax Coloring"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" + id="org.etsi.mts.tdl.TDLtxi.templates" + name="Templates"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + </extension> + <extension + point="org.eclipse.ui.propertyPages"> + <page + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" + id="org.etsi.mts.tdl.TDLtxi" + name="TDLtxi"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + <extension + point="org.eclipse.ui.keywords"> + <keyword + id="org.etsi.mts.tdl.ui.keyword_TDLtxi" + label="TDLtxi"/> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Trigger expensive validation" + id="org.etsi.mts.tdl.TDLtxi.validate" + name="Validate"> + </command> + <!-- copy qualified name --> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + <command + id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + categoryId="org.eclipse.ui.category.edit" + description="Copy the qualified name for the selected element" + name="Copy Qualified Name"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command + commandId="org.etsi.mts.tdl.TDLtxi.validate" + style="push" + tooltip="Trigger expensive validation"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + <!-- copy qualified name --> + <menuContribution locationURI="popup:#TextEditorContext?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="menu:edit?after=copy"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> + <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" + style="push" tooltip="Copy Qualified Name"> + <visibleWhen checkEnabled="false"> + <and> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.XtextEditor.opened" /> + <iterate> + <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> + </iterate> + </and> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> + <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" + commandId="org.eclipse.xtext.ui.editor.FindReferences"> + <activeWhen> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.core.contenttype.contentTypes"> + <content-type + base-type="org.eclipse.core.runtime.text" + file-extensions="tdltxi" + id="org.etsi.mts.tdl.TDLtxi.contenttype" + name="TDLtxi File" + priority="normal"> + </content-type> + </extension> + <!-- adding resource factories --> + <extension + point="org.eclipse.emf.ecore.extension_parser"> + <parser + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" + type="tdltxi"> + </parser> + </extension> + <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> + <resourceServiceProvider + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" + uriExtension="tdltxi"> + </resourceServiceProvider> + </extension> + <!-- marker definitions for org.etsi.mts.tdl.TDLtxi --> + <extension + id="tdltxi.check.fast" + name="TDLtxi Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.fast"/> + <persistent value="true"/> + </extension> + <extension + id="tdltxi.check.normal" + name="TDLtxi Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.normal"/> + <persistent value="true"/> + </extension> + <extension + id="tdltxi.check.expensive" + name="TDLtxi Problem" + point="org.eclipse.core.resources.markers"> + <super type="org.eclipse.xtext.ui.check.expensive"/> + <persistent value="true"/> + </extension> + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage" + id="org.etsi.mts.tdl.TDLtxi.validator.preferencePage" + name="Errors/Warnings"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + </extension> + <extension point="org.eclipse.xtext.builder.participant"> + <participant + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" + fileExtensions="tdltxi"/> + </extension> + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.etsi.mts.tdl.TDLtxi.compiler.preferencePage" + name="Compiler"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + </extension> + <extension point="org.eclipse.ui.propertyPages"> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" + id="org.etsi.mts.tdl.TDLtxi.compiler.propertyPage" + name="Compiler"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + <enabledWhen> + <adapt type="org.eclipse.core.resources.IProject"/> + </enabledWhen> + <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> + </page> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration"> + <command + commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand" + id="org.etsi.mts.tdl.TDLtxi.OpenGeneratedCode" + style="push"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened" /> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler" + commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"> + <activeWhen> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened" /> + </activeWhen> + </handler> + </extension> + <!-- Quick Outline --> + <extension + point="org.eclipse.ui.handlers"> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" + commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> + <activeWhen> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension + point="org.eclipse.ui.commands"> + <command + description="Open the quick outline." + id="org.eclipse.xtext.ui.editor.outline.QuickOutline" + name="Quick Outline"> + </command> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.open"> + <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" + style="push" + tooltip="Open Quick Outline"> + <visibleWhen checkEnabled="false"> + <reference definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"/> + </visibleWhen> + </command> + </menuContribution> + </extension> + <!-- quickfix marker resolution generator for org.etsi.mts.tdl.TDLtxi --> + <extension + point="org.eclipse.ui.ide.markerResolution"> + <markerResolutionGenerator + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.etsi.mts.tdl.txi.ui.tdltxi.check.fast"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.etsi.mts.tdl.txi.ui.tdltxi.check.normal"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + <markerResolutionGenerator + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" + markerType="org.etsi.mts.tdl.txi.ui.tdltxi.check.expensive"> + <attribute + name="FIXABLE_KEY" + value="true"> + </attribute> + </markerResolutionGenerator> + </extension> + <!-- Rename Refactoring --> + <extension point="org.eclipse.ui.handlers"> + <handler + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler" + commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> + <activeWhen> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </activeWhen> + </handler> + </extension> + <extension point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:#TextEditorContext?after=group.edit"> + <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" + style="push"> + <visibleWhen checkEnabled="false"> + <reference + definitionId="org.etsi.mts.tdl.TDLtxi.Editor.opened"> + </reference> + </visibleWhen> + </command> + </menuContribution> + </extension> + <extension point="org.eclipse.ui.preferencePages"> + <page + category="org.etsi.mts.tdl.TDLtxi" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" + id="org.etsi.mts.tdl.TDLtxi.refactoring" + name="Refactoring"> + <keywordReference id="org.etsi.mts.tdl.ui.keyword_TDLtxi"/> + </page> + </extension> + <extension point="org.eclipse.compare.contentViewers"> + <viewer id="org.etsi.mts.tdl.TDLtxi.compare.contentViewers" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" + extensions="tdltxi"> + </viewer> + <contentTypeBinding + contentTypeId="org.etsi.mts.tdl.TDLtxi.contenttype" + contentViewerId="org.etsi.mts.tdl.TDLtxi.compare.contentViewers" /> + </extension> + <extension point="org.eclipse.compare.contentMergeViewers"> + <viewer id="org.etsi.mts.tdl.TDLtxi.compare.contentMergeViewers" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" + extensions="tdltxi" label="TDLtxi Compare"> + </viewer> + <contentTypeBinding + contentTypeId="org.etsi.mts.tdl.TDLtxi.contenttype" + contentMergeViewerId="org.etsi.mts.tdl.TDLtxi.compare.contentMergeViewers" /> + </extension> + <extension point="org.eclipse.ui.editors.documentProviders"> + <provider id="org.etsi.mts.tdl.TDLtxi.editors.documentProviders" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" + extensions="tdltxi"> + </provider> + </extension> + <extension point="org.eclipse.team.core.fileTypes"> + <fileTypes + extension="tdltxi" + type="text"> + </fileTypes> + </extension> + <extension + point="org.eclipse.ui.newWizards"> + <category id="org.etsi.mts.tdl.ui.category" name="TDLtxi"> + </category> + <wizard + category="org.etsi.mts.tdl.ui.category" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewProjectWizard" + id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard" + name="TDLtxi Project" + icon="icons/new_TDLtxi_proj.gif" + project="true"> + </wizard> + </extension> + <extension + point="org.eclipse.xtext.ui.projectTemplate"> + <projectTemplateProvider + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxiProjectTemplateProvider" + grammarName="org.etsi.mts.tdl.TDLtxi"> + </projectTemplateProvider> + </extension> + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"/> + </perspectiveExtension> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipse.ui.main.toolbar"> + <toolbar + id="org.etsi.mts.tdl.ui.toolbar"> + <!-- + For some reason the tooltip is not shown when hovering over the toolbar button + See also https://www.eclipse.org/forums/index.php/t/1079111/ + --> + <command + commandId="org.eclipse.ui.newWizard" + tooltip="Create a new TDLtxi project"> + <parameter + name="newWizardId" + value="org.etsi.mts.tdl.ui.wizard.TDLtxiNewProjectWizard"> + </parameter> + </command> + </toolbar> + </menuContribution> + </extension> + <extension + point="org.eclipse.ui.newWizards"> + <category id="org.etsi.mts.tdl.ui.category" name="TDLtxi"> + </category> + <wizard + category="org.etsi.mts.tdl.ui.category" + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.wizard.template.TemplateNewFileWizard" + id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard" + name="TDLtxi File" + icon="icons/new_TDLtxi_file.png"> + </wizard> + </extension> + <extension + point="org.eclipse.xtext.ui.fileTemplate"> + <fileTemplateProvider + class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.etsi.mts.tdl.ui.wizard.TDLtxiFileTemplateProvider" + grammarName="org.etsi.mts.tdl.TDLtxi"> + </fileTemplateProvider> + </extension> + <extension + point="org.eclipse.ui.perspectiveExtensions"> + <perspectiveExtension targetID="org.eclipse.ui.resourcePerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"/> + </perspectiveExtension> + <perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective"> + <newWizardShortcut id="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"/> + </perspectiveExtension> + </extension> + <extension + point="org.eclipse.ui.menus"> + <menuContribution + allPopups="false" + locationURI="toolbar:org.eclipse.ui.main.toolbar"> + <toolbar + id="org.etsi.mts.tdl.ui.toolbar"> + <!-- + For some reason the tooltip is not shown when hovering over the toolbar button + See also https://www.eclipse.org/forums/index.php/t/1079111/ + --> + <command + commandId="org.eclipse.ui.newWizard" + tooltip="Create a new TDLtxi file"> + <parameter + name="newWizardId" + value="org.etsi.mts.tdl.ui.wizard.TDLtxiNewFileWizard"> + </parameter> + </command> + </toolbar> + </menuContribution> + </extension> +</plugin> diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/Messages.java b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/Messages.java new file mode 100644 index 0000000000000000000000000000000000000000..a20318191b278a7dcf3f62585b3380bccbb87539 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/Messages.java @@ -0,0 +1,28 @@ +/* + * generated by Xtext 2.29.0 + */ +package org.etsi.mts.tdl.ui.wizard; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.etsi.mts.tdl.ui.wizard.messages"; //$NON-NLS-1$ + + public static String TDLtxiFile_Label; + public static String TDLtxiFile_Description; + public static String TDLtxiLibrary_Label; + public static String TDLtxiLibrary_Description; + public static String TDLtxProject_Description; + public static String TDLtxiProject_Label; + public static String TDLtxiProject_Description; + public static String TDLtxiProjectBase_Label; + public static String TDLtxiProjectBase_Description; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiFileTemplateProvider.xtend b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiFileTemplateProvider.xtend new file mode 100644 index 0000000000000000000000000000000000000000..c7d33c06dbe91c060ad56f8d63708eaa9f363481 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiFileTemplateProvider.xtend @@ -0,0 +1,102 @@ +/* + * generated by Xtext 2.27.0 + */ +package org.etsi.mts.tdl.ui.wizard + + +import org.eclipse.xtext.ui.wizard.template.FileTemplate +import org.eclipse.xtext.ui.wizard.template.IFileGenerator +import org.eclipse.xtext.ui.wizard.template.IFileTemplateProvider +import org.eclipse.core.runtime.preferences.InstanceScope +import org.eclipse.ui.preferences.ScopedPreferenceStore +import org.etsi.mts.tdl.ui.wizard.TemplateHelper.Libraries + +/** + * Create a list with all file templates to be shown in the template new file wizard. + * + * Each template is able to generate one or more files. + */ +class TDLtxiFileTemplateProvider implements IFileTemplateProvider { + override getFileTemplates() { + #[ + new TDLtxiFile, +// new TDLtxiFileFromOpenAPI, + new TDLtxiLibrary + ] + } +} + +@FileTemplate(label="TDLtxi", icon="file_template.png", description="Create a new package for TDLtxi.") +final class TDLtxiFile { + //TODO: make it more sensible + val packageName = text("Package Name:", "EmptyPackage", "The name of the package") + + //TODO: reuse? + override generateFiles(IFileGenerator generator) { + generator.generate('''«folder»/«name».tdltxi''', ''' + /* + * This is an example model + */ + Package «packageName» { + + } + ''') +// generator.generate('''«folder»/«packageName».tdltx''', TemplateContent.Example) + } +} + +@FileTemplate(label="TDLtxi Library", icon="file_template.png", description="Add library for TDL.") +final class TDLtxiLibrary { + //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.") + var validated = false + + override protected updateVariables() { + validated = true + super.updateVariables() + } + + //TODO: reuse? + override generateFiles(IFileGenerator generator) { + //TODO: use enum values? + if (validated) { + generator.generate('''«folder»/«name».tdltxi''', TemplateHelper.getLibrary(packageName.value)) + } + } +} + + +//@FileTemplate(label="Data definitions import from OpenAPI", icon="file_template.png", description="Create a new package for TDLtx from OpenAPI data definitions.") +//final class TDLtxiFileFromOpenAPI { +// //TODO: more modern way? +// val s = new ScopedPreferenceStore(new InstanceScope(), "org.etsi.mts.tdl.tx.ui.template.data.openapi") +// val lastUsed = "LAST_USED" +// //TODO: file prompt? +// val dataDefinitionsPath = text("Data Definitions Path:", s.getString(lastUsed), "The data definitions path to import from") +// val sourceMapping = text("Source mapping tag:", "SOURCE_MAPPING", "The source mapping tag to be used for the data mappings") +// val targetMapping = text("Target mapping tag:", "TARGET_MAPPING", "The target mapping tag to be used for the data mappings") +// +// var validated = false +// +// override protected updateVariables() { +// validated = true +// s.setValue(lastUsed, dataDefinitionsPath.value) +// s.save() +// super.updateVariables() +// } +// +// override generateFiles(IFileGenerator generator) { +// //NOTE: this is triggered on every key stroke.. -> lock until second screen +// if (validated) { +// generator.generate('''«folder»/«name».tdltx''', +// ConverterNext.processToString(dataDefinitionsPath.value, +// folder+"/"+name+".tdltx", +// sourceMapping.value, +// targetMapping.value +// )) +// } +// } +// +//} diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProject.xtend b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProject.xtend new file mode 100644 index 0000000000000000000000000000000000000000..762b456a299accd930f88345052d29ab6cfd6551 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProject.xtend @@ -0,0 +1,122 @@ +package org.etsi.mts.tdl.ui.wizard +import org.eclipse.xtext.ui.wizard.template.ProjectTemplate +import com.google.inject.Inject +import org.eclipse.xtext.ui.PluginImageHelper +import org.eclipse.core.runtime.Status +import static org.eclipse.core.runtime.IStatus.* +import org.eclipse.xtext.ui.wizard.template.IProjectGenerator +import org.eclipse.xtext.ui.util.PluginProjectFactory +import org.eclipse.jdt.core.JavaCore +import org.eclipse.xtext.ui.XtextProjectHelper +import org.eclipse.swt.graphics.Image +import java.util.List +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.runtime.Path +import org.eclipse.ui.PlatformUI +import org.eclipse.ui.ide.IDE +import org.eclipse.swt.widgets.Display +import org.etsi.mts.tdl.txi.ui.internal.TxiActivator + +//TODO: customise +@ProjectTemplate(label="TDLtxi", icon="project_template.png", description="<p><b>TDLtxi</b></p> +<p>This is a parameterized project for TDLtxi. You can set a parameter to modify the content in the generated file +and a parameter to set the path the file is created in.</p><p><img href=\"project_template.png\"/></p>") +final class TDLtxiProject { + //TODO: remove after testing + val advanced = check("Advanced:", false) + val advancedGroup = group("Properties") +// 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") + 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 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) + + @Inject + PluginImageHelper pluginImageHelper + + override protected updateVariables() { + name.enabled = advanced.value + path.enabled = advanced.value + importStandard.enabled = advanced.value + importHTTP.enabled = advanced.value + extendedNature.enabled = advanced.value + if (!advanced.value) { + name.value = "Main" + path.value = "tdl" + importStandard.value = true + importHTTP.value = false + extendedNature.value = false + } + } + + override protected validate() { + //TODO: validate name as well + if (path.value.matches('[a-z][a-z0-9_.]*(/[a-z][a-z0-9_.]*)*')) + null + else + new Status(ERROR, "Wizard", "'" + path + "' is not a valid package name") + //TODO: validate data definitions as well + } + + override generateProjects(IProjectGenerator generator) { + generator.generate(new PluginProjectFactory => [ + projectName = projectInfo.projectName + location = projectInfo.locationPath + projectNatures += #[XtextProjectHelper.NATURE_ID] + builderIds += #[XtextProjectHelper.BUILDER_ID] + if (extendedNature.value) { + projectNatures += #[JavaCore.NATURE_ID, "org.eclipse.pde.PluginNature"] + builderIds += #[JavaCore.BUILDER_ID] + } + folders += "src" + //TODO: remove hardcoded import + var imports = "" + if (importStandard.value) { + addFile('''src/«path»/Standard.tdltxi''', TemplateHelper.getLibrary("Standard")) + imports += "Import all from Standard\n" + } + if (importHTTP.value) { + addFile('''src/«path»/HTTP.tdltxi''', TemplateHelper.getLibrary("HTTP")) + imports += "Import all from HTTP\n" + imports += "Import all from HTTP.MessageBased\n" + } + addFile('''src/«path»/«name».tdltx''', ''' + /* + * This is an example package + */ + Package «name» + «imports» + //example type + Type float + //define additional elements here + + ''') + ]) + //TODO: make more robust and share among other templates + open(projectInfo.projectName+"/src/"+path+"/"+name+".tdltx") + } + + private def open(String filePath) { + val path = new Path(filePath) + val ifile=ResourcesPlugin.getWorkspace().getRoot().getFile(path) +// val page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + val page = PlatformUI.workbench.workbenchWindows.get(0).activePage + Display.^default.asyncExec(new Runnable() { + + override run() { + IDE.openEditor(page, ifile) + } + + }) + } + + protected override List<Pair<String, Image>> getImages() { + #["project_template.png".image] + } + private def image(String id) { + id -> pluginImageHelper.getImage('''platform:/plugin/«TxiActivator.PLUGIN_ID»/«id»''') + } + +} diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectBase.xtend b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectBase.xtend new file mode 100644 index 0000000000000000000000000000000000000000..4b2e0a57f11a7cc4b74dca0430001fe171555427 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectBase.xtend @@ -0,0 +1,122 @@ +package org.etsi.mts.tdl.ui.wizard +import org.eclipse.xtext.ui.wizard.template.ProjectTemplate +import com.google.inject.Inject +import org.eclipse.xtext.ui.PluginImageHelper +import org.eclipse.core.runtime.Status +import static org.eclipse.core.runtime.IStatus.* +import org.eclipse.xtext.ui.wizard.template.IProjectGenerator +import org.eclipse.xtext.ui.util.PluginProjectFactory +import org.eclipse.jdt.core.JavaCore +import org.eclipse.xtext.ui.XtextProjectHelper +import org.eclipse.swt.graphics.Image +import java.util.List +import org.eclipse.core.resources.ResourcesPlugin +import org.eclipse.core.runtime.Path +import org.eclipse.ui.PlatformUI +import org.eclipse.ui.ide.IDE +import org.eclipse.swt.widgets.Display +import org.etsi.mts.tdl.txi.ui.internal.TxiActivator + +//TODO: customise +@ProjectTemplate(label="TDLtxi Base", icon="project_template.png", description="<p><b>TDLtxi</b></p> +<p>This is a parameterized project for TDLtxi. You can set a parameter to modify the content in the generated file +and a parameter to set the path the file is created in.</p><p><img href=\"project_template.png\"/></p>") +final class TDLtxiProjectBase { + //TODO: remove after testing + val advanced = check("Advanced:", false) + val advancedGroup = group("Properties") +// 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") + 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 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) + + @Inject + PluginImageHelper pluginImageHelper + + override protected updateVariables() { + name.enabled = advanced.value + path.enabled = advanced.value + importStandard.enabled = advanced.value + importHTTP.enabled = advanced.value + extendedNature.enabled = advanced.value + if (!advanced.value) { + name.value = "Main" + path.value = "tdl" + importStandard.value = true + importHTTP.value = false + extendedNature.value = false + } + } + + override protected validate() { + //TODO: validate name as well + if (path.value.matches('[a-z][a-z0-9_.]*(/[a-z][a-z0-9_.]*)*')) + null + else + new Status(ERROR, "Wizard", "'" + path + "' is not a valid package name") + //TODO: validate data definitions as well + } + + override generateProjects(IProjectGenerator generator) { + generator.generate(new PluginProjectFactory => [ + projectName = projectInfo.projectName + location = projectInfo.locationPath + projectNatures += #[XtextProjectHelper.NATURE_ID] + builderIds += #[XtextProjectHelper.BUILDER_ID] + if (extendedNature.value) { + projectNatures += #[JavaCore.NATURE_ID, "org.eclipse.pde.PluginNature"] + builderIds += #[JavaCore.BUILDER_ID] + } + folders += "src" + //TODO: remove hardcoded import + var imports = "" + if (importStandard.value) { + addFile('''src/«path»/Standard.tdltxi''', TemplateHelper.getLibrary("Standard")) + imports += "Import all from Standard\n" + } + if (importHTTP.value) { + addFile('''src/«path»/HTTP.tdltxi''', TemplateHelper.getLibrary("HTTP")) + imports += "Import all from HTTP\n" + imports += "Import all from HTTP.MessageBased\n" + } + addFile('''src/«path»/«name».tdltx''', ''' + /* + * This is an example package + */ + Package «name» + «imports» + //example type + Type float + //define additional elements here + + ''') + ]) + //TODO: make more robust and share among other templates + open(projectInfo.projectName+"/src/"+path+"/"+name+".tdltxi") + } + + private def open(String filePath) { + val path = new Path(filePath) + val ifile=ResourcesPlugin.getWorkspace().getRoot().getFile(path) +// val page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + val page = PlatformUI.workbench.workbenchWindows.get(0).activePage + Display.^default.asyncExec(new Runnable() { + + override run() { + IDE.openEditor(page, ifile) + } + + }) + } + + protected override List<Pair<String, Image>> getImages() { + #["project_template.png".image] + } + private def image(String id) { + id -> pluginImageHelper.getImage('''platform:/plugin/«TxiActivator.PLUGIN_ID»/«id»''') + } + +} diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectTemplateProvider.xtend b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectTemplateProvider.xtend new file mode 100644 index 0000000000000000000000000000000000000000..dcc41861ac6b5df686dadce41cb01abb56548ddb --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/TDLtxiProjectTemplateProvider.xtend @@ -0,0 +1,35 @@ +/* + * generated by Xtext 2.29.0 + */ +package org.etsi.mts.tdl.ui.wizard + +import com.google.inject.Inject +import org.eclipse.xtext.ui.wizard.template.IProjectTemplateProvider + +/** + * Create a list with all project templates to be shown in the template new project wizard. + * + * Each template is able to generate one or more projects. Each project can be configured such that any number of files are included. + */ +class TDLtxiProjectTemplateProvider implements IProjectTemplateProvider { + @Inject + TDLtxiProject iTDLtxProject + + @Inject + TDLtxiProjectBase iTDLtxProjectBase + +// @Inject +// TDLtxiProjectWithOpenAPI iTDLtxProjectWithOpenAPI + + override getProjectTemplates() { + #[ +// new TDLtxProject, +// new TDLtxProjectBase, +// new TDLtxProjectWithOpenAPI + iTDLtxProject, + iTDLtxProjectBase +// , +// iTDLtxProjectWithOpenAPI + ] + } +} diff --git a/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/messages.properties b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/messages.properties new file mode 100644 index 0000000000000000000000000000000000000000..3e05d92fd1c990d87f8501f802d35d27ba73e3ba --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/src/org/etsi/mts/tdl/ui/wizard/messages.properties @@ -0,0 +1,9 @@ +TDLtxiFile_Label=TDLtxi +TDLtxiFile_Description=Create a new package for TDLtxi. +TDLtxiLibrary_Label=TDLtxi Library +TDLtxiLibrary_Description=Add library for TDL. +TDLtxProject_Description=<p><b>TDLtx</b></p> <p>This is a parameterized project for TDLtx. You can set a parameter to modify the content in the generated file and a parameter to set the path the file is created in.</p><p><img href="project_template.png"/></p> +TDLtxiProject_Label=TDLtxi +TDLtxiProject_Description=<p><b>TDLtxi</b></p> <p>This is a parameterized project for TDLtxi. You can set a parameter to modify the content in the generated file and a parameter to set the path the file is created in.</p><p><img href="project_template.png"/></p> +TDLtxiProjectBase_Label=TDLtxi Base +TDLtxiProjectBase_Description=<p><b>TDLtxi</b></p> <p>This is a parameterized project for TDLtxi. You can set a parameter to modify the content in the generated file and a parameter to set the path the file is created in.</p><p><img href="project_template.png"/></p> diff --git a/plugins/org.etsi.mts.tdl.txi.ui/templates/HTTP.tdltxi b/plugins/org.etsi.mts.tdl.txi.ui/templates/HTTP.tdltxi new file mode 100644 index 0000000000000000000000000000000000000000..1c5fdae7bf0c4d27a59e408306f206f73150c7d9 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/templates/HTTP.tdltxi @@ -0,0 +1,106 @@ +Package HTTP + Package MessageBasedConfiguration + Import all from MessageBased + Message Gate HTTPGate accepts Request,Response + Component API + gate HTTPGate http + Configuration BasicClientServer + API client as Tester, + API server as SUT, + connect client::http to server::http + Note : "Message based types and instances" + Package MessageBased + Import all from Standard + Type Method + Method mGET + Method mPOST + Method mPUT + Method mPATCH + Method mDELETE + Structure Request ( + String uri, + optional Method method, + optional Headers headers, + optional Parameters parameters, + optional Body body + ) + Request GET ( ) + Request POST ( ) + Request PUT ( ) + Request PATCH ( ) + Request DELETE ( ) + Structure Response ( + optional Integer status, + optional String statusMessage, + optional Headers headers, + optional Body body + ) + Response r200 ( + statusMessage = "OK" + ) + Response r201 ( + statusMessage = "Created" + ) + Response r204 ( + statusMessage = "No Content" + ) + Response r400 ( + statusMessage = "Bad Request" + ) + Response r401 ( + statusMessage = "Not Found" + ) + Response r403 ( + statusMessage = "Not Authorized" + ) + Response r404 ( + statusMessage = "Forbidden" + ) + Response OK ( + status = "200" + ) + Response Created ( + status = "201" + ) + Response NoContent ( + status = "204" + ) + Response BadRequest ( + status = "400" + ) + Response NotFound ( + status = "404" + ) + Response NotAuthorized ( + status = "401" + ) + Response Forbidden ( + status = "403" + ) + Collection Parameters of Parameter + Structure Parameter ( + Location location, + String ^name, + String ^value + ) + Type Location + Location path + Location query + Location cookie + Collection Headers of Header + Structure Header ( + String ^name, + String ^value + ) + Structure Body ( ) + Structure StringBody extends Body ( + String text + ) + Structure CollectionBody extends Body ( + Bodies items + ) + Collection Bodies of Body + Structure FormBody extends Body ( + String field, + String content + ) diff --git a/plugins/org.etsi.mts.tdl.txi.ui/templates/Standard.tdltxi b/plugins/org.etsi.mts.tdl.txi.ui/templates/Standard.tdltxi new file mode 100644 index 0000000000000000000000000000000000000000..70ed43a2a0bced406e8dfd4dd88ee60241bdac45 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/templates/Standard.tdltxi @@ -0,0 +1,55 @@ +Package Standard + //TODO: extract to standard library + Constraint length + Constraint minLength + Constraint maxLength + Constraint range + Constraint format + Constraint union + Constraint uniontype + + Type Boolean + Type Integer + Type String + Type Verdict + + //TODO: these do not work at present -> literal values take precedence? +// Boolean true +// Boolean false + Boolean True + Boolean False + + Verdict pass + Verdict fail + Verdict inconclusive + + Time second + + Annotation Master + Annotation MappingName + + //standard annotations for STO + Annotation Initial conditions + Annotation Expected behaviour + Annotation Final conditions + Annotation Test Purpose Description + Annotation when + Annotation then + + Predefined == returns Boolean + Predefined != returns Boolean + Predefined and returns Boolean + Predefined or returns Boolean + Predefined xor returns Boolean + Predefined not returns Boolean + Predefined < returns Boolean + Predefined > returns Boolean + Predefined <= returns Boolean + Predefined >= returns Boolean + Predefined + + Predefined - + Predefined * + Predefined / + Predefined mod + Predefined size returns Integer + diff --git a/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.id.xml b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.id.xml new file mode 100644 index 0000000000000000000000000000000000000000..73d3811534e9ed6b9978de94467e46d11be15ddc --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.id.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_Configuration" deleted="false" description="Configuraiton with necessary component and gate types" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration" name="Configuration">Configuration ${name} { + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} +} +Message Gate ${gateType} accepts ${accepted} +Component ${componentType} { + gate ${gateType} ${interfaceName} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Alternative template" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration.in" name="Configuration in">Configuration example${name} { + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} +} +Message Gate ${gateType} accepts ${dataType:CrossReference('GateType.dataType')} +Component ${componentType} { + gate ${gateType} ${interfaceName} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_Objective" deleted="false" description="Test objective template" enabled="true" id="org.etsi.mts.tdl.tx.templates.Objective" name="Objective">Objective ${name} { + Description: "example" + References: "reference" +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_Package" deleted="false" description="Basic package structure" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package" name="Package">Package ${name} { + Type integer + Type string + Message Gate http accepts string, integer + Component node { + gate http interface + } + Configuration base { + node sut as SUT, + node tester as Tester, + connect sut::interface to tester::interface + } + Test example uses base { + tester::interface sends "hello" to sut::interface + } +} + +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Receive a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Receive.message" name="Receive message">${targetGate:CrossReference(Target.targetGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${source:CrossReference(Interaction.sourceGate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Send a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Send.message" name="Send message">${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_Test" deleted="false" description="Test Purpose Description template" enabled="true" id="org.etsi.mts.tdl.tx.templates.TestPurposeDescription" name="TestPurposeDescription">Test Purpose Description ${name} { + Objective: ${objective:CrossReference('TestDescription.testObjective')} + Configuration: ${configuration:CrossReference('TestDescription.testConfiguration')} + Expected behaviour + ensure that { + when { + tester::interface sends "hello" to sut::interface + ${source:CrossReference('Message.sourceGate')} sends "ey" to sut::interface + } + then { + tester::interface receives "hello back" from sut::interface + } + } +} +</template></templates> \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xml b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xml new file mode 100644 index 0000000000000000000000000000000000000000..acc1d05bc9c00bad37911da2d94517b16aaef344 --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xml @@ -0,0 +1,393 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<templates> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Action" deleted="false" description="Action with Body" enabled="true" id="org.etsi.mts.tdl.tx.templates.Action" name="Action">Action ${actionName} : "${body}"</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ActionReference" deleted="false" description="Action Reference" enabled="true" id="org.etsi.mts.tdl.tx.templates.Action.Reference" name="Action Reference">perform ${action:CrossReference(ActionReference.action)} on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AlternativeBehaviour" deleted="false" description="Alternative Behaviour with two Blocks" enabled="true" id="org.etsi.mts.tdl.tx.templates.Alternative.Behaviour.with.two.Blocks" name="Alternative Behaviour with two Blocks">alternatively + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + or + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_argument" deleted="false" description="Argument Replacement" enabled="true" id="org.etsi.mts.tdl.tx.templates.Argument.Replacement" name="Argument Replacement">argument replaced by ${newValue}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Assertion" deleted="false" description="Assertion" enabled="true" id="org.etsi.mts.tdl.tx.templates.Assertion" name="Assertion">assert ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)} otherwise ${dataElement:CrossReference(DataElementUse.dataElement)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Assignment" deleted="false" description="Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Assignment" name="Assignment">${componentInstance:CrossReference(VariableUse.componentInstance)}::${variable:CrossReference(VariableUse.variable)} = ${dataElement:CrossReference(DataElementUse.dataElement)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PredefinedFunctionCall" deleted="false" description="Binary Predefined Function Call" enabled="true" id="org.etsi.mts.tdl.tx.templates.Binary.Predefined.Function.Call" name="Binary Predefined Function Call">${left:CrossReference(PredefinedFunctionCall.actualParameters)} ${function:CrossReference(PredefinedFunctionCall.function)} ${right:CrossReference(PredefinedFunctionCall.actualParameters)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PredefinedFunctionCall" deleted="false" description="Binary Predefined Function Call with Parentheses" enabled="true" id="org.etsi.mts.tdl.tx.templates.Binary.Predefined.Function.Call.with.Parentheses" name="Binary Predefined Function Call with Parentheses">(${left:CrossReference(PredefinedFunctionCall.actualParameters)} ${function:CrossReference(PredefinedFunctionCall.function)} ${right:CrossReference(PredefinedFunctionCall.actualParameters)})</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.BoundedLoopBehaviour" deleted="false" description="Bounded Loop Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Bounded.Loop.Behaviour" name="Bounded Loop Behaviour">repeat ${numIteration:CrossReference(DataElementUse.dataElement)} times on ${componentInstance:CrossReference(LocalExpression.componentInstance)} + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Collection Data Instance" enabled="true" id="org.etsi.mts.tdl.tx.templates.Collection.Data.Instance" name="Collection Data Instance">${dataType:CrossReference(DataInstance.dataType)} ${name} [ ${dataElement:CrossReference(DataElementUse.dataElement)}${cursor} ] +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Collection Data Type" enabled="true" id="org.etsi.mts.tdl.tx.templates.Collection.Data.Type" name="Collection Data Type">Collection ${name} of ${itemType:CrossReference(CollectionDataType.itemType)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ComponentInstance" deleted="false" description="Component Instance" enabled="true" id="org.etsi.mts.tdl.tx.templates.Component.Instance" name="Component Instance">${componentType:CrossReference(ComponentInstance.type)} ${componentName} as ${role:Enum(ComponentInstanceRole)}, +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ComponentInstanceBinding" deleted="false" description="Component Instance Binding" enabled="true" id="org.etsi.mts.tdl.tx.templates.Component.Instance.Binding" name="Component Instance Binding">${formalComponent:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent:CrossReference(ComponentInstanceBinding.actualComponent)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Component Type" enabled="true" id="org.etsi.mts.tdl.tx.templates.Component.Type" name="Component Type">Component ${componentTypeName} + gate ${gateType} ${gateName} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.CompoundBehaviour" deleted="false" description="Compound Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Compound.Behaviour" name="Compound Behaviour"> + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ConditionalBehaviour" deleted="false" description="Conditional Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Conditional.Behaviour" name="Conditional Behaviour">if [ ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ConditionalBehaviour" deleted="false" description="Conditional Behaviour with else Block" enabled="true" id="org.etsi.mts.tdl.tx.templates.Conditional.Behaviour.with.else.Block" name="Conditional Behaviour with else Block">if [ ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + else + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Connection" deleted="false" description="Connection" enabled="true" id="org.etsi.mts.tdl.tx.templates.Connection" name="Connection">connect ${component1:CrossReference(GateReference.component)}::${gate1:CrossReference(GateReference.gate)} to ${component2:CrossReference(GateReference.component)}::${gate2:CrossReference(GateReference.gate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Connection" deleted="false" description="Connection with named Gate References" enabled="true" id="org.etsi.mts.tdl.tx.templates.Connection.with.Names" name="Connection with Names">connect ${gateReference1}=${component1:CrossReference(GateReference.component)}::${gate1:CrossReference(GateReference.gate)} to ${gateReference2}=${component2:CrossReference(GateReference.component)}::${gate2:CrossReference(GateReference.gate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_containing" deleted="false" description="Content" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content" name="Content">containing + ${contentName} ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Assigment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Assignment" name="Content Assignment">${contentName} set to ${contentValue} ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Nested" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Nested" name="Content Nested">${contentName} containing + ${contentValue} ${cursor} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Reference" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Reference" name="Content Reference">corresponding to the value contained in ${content:CrossReference(ContentReference.content)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Reference Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Reference.Assignment" name="Content Reference Assignment">${contentName} corresponding to the value contained in ${content:CrossReference(ContentReference.content)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Value Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Value.Assignment" name="Content Value Assignment">set to ${contentValue}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Value Reference" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Value.Reference" name="Content Value Reference">corresponding to the value of ${content:CrossReference(LiteralValueReference.content)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Value Reference Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.Value.Reference.Assignment" name="Content Value Reference Assignment">${contentName} corresponding to the value of ${content:CrossReference(LiteralValueReference.content)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_containing" deleted="false" description="Content with Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Content.with.Assignment" name="Content with Assignment">containing + ${contentName} set to ${contentValue}${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataElementMapping" deleted="false" description="Data Element Mapping" enabled="true" id="org.etsi.mts.tdl.tx.templates.Data.Element.Mapping" name="Data Element Mapping">Map ${dataElement:CrossReference(DataElementMapping.mappableDataElement)} to "${uri}" in ${dataResourceMapping:CrossReference(DataElementMapping.dataResourceMapping)} as ${dataElement}_MAPPING</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataElementMapping" deleted="false" description="Data Element Mapping with Parameter Mapping" enabled="true" id="org.etsi.mts.tdl.tx.templates.Data.Element.Mapping.with.Parameter.Mapping" name="Data Element Mapping with Parameter Mapping">Map ${dataElement:CrossReference(DataElementMapping.mappableDataElement)} to "${uri}" in ${dataResourceMapping:CrossReference(DataElementMapping.dataResourceMapping)} as ${dataElement}_MAPPING + ${parameter:CrossReference(ParameterMapping.parameter)} -> "${parameterUri}" +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataResourceMapping" deleted="false" description="Data Resource Mapping" enabled="true" id="org.etsi.mts.tdl.tx.templates.Data.Resource.Mapping" name="Data Resource Mapping">Use "${uri}" as ${mappingName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DefaultBehaviour" deleted="false" description="Default Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Default.Behaviour" name="Default Behaviour">default on ${guardedComponent:CrossReference(ExceptionalBehaviour.guardedComponent)} + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EntityBinding" deleted="false" description="Entity Binding" enabled="true" id="org.etsi.mts.tdl.tx.templates.Entity.Binding" name="Entity Binding">the ${entity:CrossReference(EntityReference.entity)} entity replaced by the ${newEntity:CrossReference(EntityReference.entity)} entity +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Enumeration Data Type" enabled="true" id="org.etsi.mts.tdl.tx.templates.Enumeration" name="Enumeration">Enumerated ${name} + ${name} ${enumInstanceName}${cursor} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventOccurrenceSpecification" deleted="false" description="Event occurrence specification" enabled="true" id="org.etsi.mts.tdl.tx.templates.Event.occurrence.specification" name="Event occurrence specification">the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventOccurrenceSpecification" deleted="false" description="Event occurrence specification with conjunction" enabled="true" id="org.etsi.mts.tdl.tx.templates.Event.occurrence.specification.with.conjunction" name="Event occurrence specification with conjunction">${conjuction} +the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventSpecificationTemplate" deleted="false" description="Event Specification Template" enabled="true" id="org.etsi.mts.tdl.tx.templates.Event.Specification.Template" name="Event Specification Template">Template ${templateName} + the ${entity:CrossReference(EntityReference.entity)} entity ${event:CrossReference(EventReference.event)} a ${argument} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventTemplateOccurrence" deleted="false" description="Event Template Occurrence" enabled="true" id="org.etsi.mts.tdl.tx.templates.Event.Template.Occurrence" name="Event Template Occurrence">${conjunction} +event ${eventTemplate:CrossReference(EventTemplateOccurrence.eventTemplate)} occurs +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventTemplateOccurrence" deleted="false" description="Event Template Occurrence with Bindings" enabled="true" id="org.etsi.mts.tdl.tx.templates.Event.Template.Occurrence.with.Bindings" name="Event Template Occurrence with Bindings">${conjunction} +event ${eventTemplate:CrossReference(EventTemplateOccurrence.eventTemplate)} occurs with + the ${entity:CrossReference(EntityReference.entity)} entity replaced by the ${newEntity:CrossReference(EntityReference.entity)} entity + argument replaced by a ${newArgument} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviour" deleted="false" description="Expected behaviour (then clause only) in Structured Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Expected.behaviour.(then.clause.only).in.Structured.Test.Objective" name="Expected behaviour (then clause only) in Structured Test Objective">Expected behaviour +ensure that + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviourBehaviour" deleted="false" description="Expected Behaviour (then clause only) in Test Purpose Description" enabled="true" id="org.etsi.mts.tdl.tx.templates.Expected.Behaviour.(then.clause.only).in.Test.Purpose.Description" name="Expected Behaviour (then clause only) in Test Purpose Description">Expected behaviour +ensure that + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviour" deleted="false" description="Expected behaviour in Structured Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Expected.behaviour.in.Structured.Test.Objective" name="Expected behaviour in Structured Test Objective">Expected behaviour +ensure that + when + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} + then + the ${entity:CrossReference(EntityReference.entity)} entity ${thenEvent:CrossReference(EventReference.event)} a ${thenArgument} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviourBehaviour" deleted="false" description="Expected Behaviour in Test Purpose Description" enabled="true" id="org.etsi.mts.tdl.tx.templates.Expected.Behaviour.in.Test.Purpose.Description" name="Expected Behaviour in Test Purpose Description">Expected behaviour +ensure that + when + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + then + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FinalConditions" deleted="false" description="Final conditions in Structured Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Final.conditions.in.Structured.Test.Objective" name="Final conditions in Structured Test Objective">Final conditions +with + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FinalConditionsBehaviour" deleted="false" description="Final Conditions in Test Purpose Description" enabled="true" id="org.etsi.mts.tdl.tx.templates.Final.Conditions.in.Test.Purpose.Description" name="Final Conditions in Test Purpose Description">Final conditions +with + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FormalParameter" deleted="false" description="Formal Parameters" enabled="true" id="org.etsi.mts.tdl.tx.templates.Formal.Parameters" name="Formal Parameters">${parameterDataType:CrossReference(Parameter.dataType)} ${parameterName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Function" deleted="false" description="Function Definition" enabled="true" id="org.etsi.mts.tdl.tx.templates.Function" name="Function">Function ${functionName} returns ${returnType:CrossReference(Function.returnType)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Function" deleted="false" description="Function Definition with Parameter" enabled="true" id="org.etsi.mts.tdl.tx.templates.Function.with.Parameter" name="Function with Parameter">Function ${functionName} (${parameterDataType:CrossReference(Parameter.dataType)} ${parameterName}) returns ${returnType:CrossReference(Function.returnType)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.GateInstance" deleted="false" description="Gate Instance" enabled="true" id="org.etsi.mts.tdl.tx.templates.Gate.Instance" name="Gate Instance">gate ${type:CrossReference(GateInstance.type)} ${gateName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Gate Type" enabled="true" id="org.etsi.mts.tdl.tx.templates.Gate.Type" name="Gate Type">${kind:Enum(GateTypeKind)} Gate ${gateTypeName} accepts ${dataType:CrossReference(GateType.dataType)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Import all Elements" enabled="true" id="org.etsi.mts.tdl.tx.templates.Import.all" name="Import all">Import all from ${importedPackage:CrossReference(Package.importedPackage)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Import individual Elements" enabled="true" id="org.etsi.mts.tdl.tx.templates.Import.Elements" name="Import Elements">Import ${variable:cursor} from ${importedPackage:CrossReference(Package.importedPackage)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InitialConditions" deleted="false" description="Initial conditions in Structured Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Initial.conditions.in.Structured.Test.Objective" name="Initial conditions in Structured Test Objective">Initial conditions +with + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InitialConditionsBehaviour" deleted="false" description="Initial Conditions in Test Purpose Description" enabled="true" id="org.etsi.mts.tdl.tx.templates.Initial.Conditions.in.Test.Purpose.Description" name="Initial Conditions in Test Purpose Description">Initial conditions +with + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InlineAction" deleted="false" description="Inline Action" enabled="true" id="org.etsi.mts.tdl.tx.templates.Inline.Action" name="Inline Action">perform action: "${body}" on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InterruptBehaviour" deleted="false" description="Interrupt Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Interrupt.Behaviour" name="Interrupt Behaviour">interrupt on ${guardedComponent:CrossReference(ExceptionalBehaviour.guardedComponent)} + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.LocalExpression" deleted="false" description="Local Expression" enabled="true" id="org.etsi.mts.tdl.tx.templates.Local.Expression" name="Local Expression">${expression:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.LocalExpression" deleted="false" description="Local Loop Expression" enabled="true" id="org.etsi.mts.tdl.tx.templates.Local.Loop.Expression" name="Local Loop Expression">${expression:CrossReference(DataElementUse.dataElement)} times on ${componentInstance:CrossReference(LocalExpression.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Member" deleted="false" description="Member" enabled="true" id="org.etsi.mts.tdl.tx.templates.Member" name="Member">${dataType:CrossReference(Parameter.dataType)} ${memberName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.MemberAssignment" deleted="false" description="Member Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Member.Assignment" name="Member Assignment">${member:CrossReference(MemberAssignment.member)} = ${dataElement:CrossReference(DataElementUse.dataElement)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Test objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Objective" name="Objective">Objective ${name} + Description: "${description}" + References: "${reference}" + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.OptionalBehaviour" deleted="false" description="Optional Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Optional.Behaviour" name="Optional Behaviour">optionally + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.OptionalBehaviour" deleted="false" description="Optional Behaviour with Guard" enabled="true" id="org.etsi.mts.tdl.tx.templates.Optional.Behaviour.with.Guard" name="Optional Behaviour with Guard">optionally [${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package.-.Empty." name="Package - Empty ">Package ${packageName} + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Example Package structure" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package" name="Package - Example ">Package ${name} + Type integer + Type string + Message Gate http accepts string, integer + Component node + gate http interface + + Configuration base + node sut as SUT, + node tester as Tester, + connect sut::interface to tester::interface + + Test example uses base + tester::interface sends "hello" to sut::interface + + + +</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 + ${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)} + in parallel to + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + and + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParallelBehaviour" deleted="false" description="Parallel Behaviour with two Blocks" enabled="true" id="org.etsi.mts.tdl.tx.templates.Parallel.Behaviour.with.two.Blocks" name="Parallel Behaviour with two Blocks">run + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + in parallel to + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParameterBinding" deleted="false" description="Parameter Binding" enabled="true" id="org.etsi.mts.tdl.tx.templates.Parameter.Binding" name="Parameter Binding">${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParameterMapping" deleted="false" description="Parameter Mapping" enabled="true" id="org.etsi.mts.tdl.tx.templates.Parameter.Mapping" name="Parameter Mapping">${parameter:CrossReference(ParameterMapping.parameter)} -> "${uri}"</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PeriodicBehaviour" deleted="false" description="Periodic Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Periodic.Behaviour" name="Periodic Behaviour">every ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)} + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureCall" deleted="false" description="Procedure Call" enabled="true" id="org.etsi.mts.tdl.tx.templates.Procedure.Call" name="Procedure Call">${referenceName}: ${sourceGate:CrossReference(Interaction.sourceGate)} calls ${signature:CrossReference(ProcedureCall.signature)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}) on ${targetGate:CrossReference(Target.targetGate)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureCallResponse" deleted="false" description="Procedure Call Response" enabled="true" id="org.etsi.mts.tdl.tx.templates.Procedure.Call.Response" name="Procedure Call Response">${replyTo:CrossReference(ProcedureCall.replyTo)}: ${sourceGate:CrossReference(Interaction.sourceGate)} responds with ${signature:CrossReference(ProcedureCall.signature)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}) to ${targetGate:CrossReference(Target.targetGate)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureParameter" deleted="false" description="Procedure Parameter" enabled="true" id="org.etsi.mts.tdl.tx.templates.Procedure.Parameter" name="Procedure Parameter">${in} ${parameterType:CrossReference(ProcedureParameter.dataType)} ${parameterName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureSignature" deleted="false" description="Procedure Signature" enabled="true" id="org.etsi.mts.tdl.tx.templates.Procedure.Signature" name="Procedure Signature">Signature ${procedureName} (${in} ${parameterType:CrossReference(ProcedureParameter.dataType)} ${parameterName})</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Quiescence" deleted="false" description="Quiescence on Component" enabled="true" id="org.etsi.mts.tdl.tx.templates.Quiescence.on.Component" name="Quiescence on Component">quiet for ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(TimeOperation.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Quiescence" deleted="false" description="Quiescence on Gate" enabled="true" id="org.etsi.mts.tdl.tx.templates.Quiescence.on.Gate" name="Quiescence on Gate">quiet for ${period:CrossReference(DataElementUse.dataElement)} on gate ${gateReference:CrossReference(Quiescence.gateReference)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Receive a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Receive.message" name="Receive message">${targetGate:CrossReference(Target.targetGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${source:CrossReference(Interaction.sourceGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Send a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Send.message" name="Send message">${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.SimpleDataInstance" deleted="false" description="Simple Data or Enumeration Instance" enabled="true" id="org.etsi.mts.tdl.tx.templates.Simple.Data.or.Enumeration.Instance" name="Simple Data or Enumeration Instance">${dataType:CrossReference(DataInstance.dataType)} ${enumInstanceName}${cursor}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Structured Data Instsance" enabled="true" id="org.etsi.mts.tdl.tx.templates.Structured.Data.Instance" name="Structured Data Instance">${dataType:CrossReference(DataInstance.dataType)} ${name} ( + ${member:CrossReference(MemberAssignment.member)} = ${dataElement:CrossReference(DataElementUse.dataElement)}${cursor} +)</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Empty Structured Data Type definition" enabled="true" id="org.etsi.mts.tdl.tx.templates.Structured.Data.Type" name="Structured Data Type">Structure ${name} ( + +) +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Structured Data Type with one Member" enabled="true" id="org.etsi.mts.tdl.tx.templates.Structured.Data.Type.with.Member" name="Structured Data Type with Member">Structure ${name} ( + ${dataType:CrossReference(Parameter.dataType)} ${memberName}${cursor} +) +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.StructuredTestObjective" deleted="false" description="Structured Test Objective full" enabled="true" id="org.etsi.mts.tdl.tx.templates.Structured.Test.Objective.full" name="Structured Test Objective full">Test Purpose ${tpName} + Objective: "${description}" + Reference: "${reference}" + Initial conditions + with + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} + + Expected behaviour + ensure that + when + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} + + then + the ${entity:CrossReference(EntityReference.entity)} entity ${thenEvent:CrossReference(EventReference.event)} a ${thenArgument} + + + Final conditions + with + the ${entity:CrossReference(EntityReference.entity)} entity ${finalEvent:CrossReference(EventReference.event)} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.StructuredTestObjective" deleted="false" description="Structured Test Objective minimal " enabled="true" id="org.etsi.mts.tdl.tx.templates.Structured.Test.Objective.minimal" name="Structured Test Objective minimal">Test Purpose ${tpName} + Objective: "${description}" + Reference: "${reference}" + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Basic Test Configuration" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Configuration" name="Test Configuration">Configuration ${testConfigurationName} + ${componentType:CrossReference(ComponentInstance.type)} ${sut} as SUT, + ${componentType:CrossReference(ComponentInstance.type)} ${tester} as Tester, + connect ${sut}::${sutGate:CrossReference(GateReference.gate)} to ${tester}::${testerGate:CrossReference(GateReference.gate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Example Test Configuraiton with necessary component and gate types" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration" name="Test Configuration Example ">Configuration ${testConfigurationName} + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} + +Message Gate ${gateType} accepts ${accepted} +Component ${componentType} + gate ${gateType} ${interfaceName} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Example Test Configuraiton with necessary component and gate types" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Configuration.Example.(refined)" name="Test Configuration Example (refined)">Message Gate ${gateTypeName} accepts ${accepted} + +Component ${componentTypeName} + gate ${gateTypeName:CrossReference(GateInstance.type)} ${gateName} + + +Configuration ${testConfigurationName} + ${componentTypeName:CrossReference(ComponentInstance.type)} ${sutName} as SUT, + ${componentTypeName:CrossReference(ComponentInstance.type)} ${testerName} as Tester, + connect ${testerName:CrossReference(GateReference.component)}::${gateName:CrossReference(GateReference.gate)} to ${sutName:CrossReference(GateReference.component)}::${gateName:CrossReference(GateReference.gate)} + + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Alternative template for example Test Configuration" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration.in" name="Test Configuration Example - Alternative">Configuration example${name} + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} + +Message Gate ${gateType} accepts ${dataType:CrossReference('GateType.dataType')} +Component ${componentType} + gate ${gateType} ${interfaceName} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description" name="Test Description">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)} + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description Declaration without any behaviour " enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description.Declaration" name="Test Description Declaration">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description.Reference" name="Test Description Reference">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference with Parameters" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description.Reference.with.Parameters" name="Test Description Reference with Parameters">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataUse})</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference with Parameters and Bindings" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description.Reference.with.Parameters.and.Bindings" name="Test Description Reference with Parameters and Bindings">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataUse}) + ${formalComponent1:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent1:CrossReference(ComponentInstanceBinding.actualComponent)}, + ${formalComponent2:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent2:CrossReference(ComponentInstanceBinding.actualComponent)} + //TODO: add other bindings if needed + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description with Basic Interactions" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Description.with.Basic.Interactions" name="Test Description with Basic Interactions">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)} + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Objective" name="Test Objective">Objective ${name} + Description: "${description}" + References: "${reference}" + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Purpose Description - Expected Behaviour Only Template" enabled="true" id="org.etsi.mts.tdl.tx.templates.TestPurposeDescription" name="Test Purpose Description - Expected Behaviour Only">Test Purpose Description ${tpdName} + Objective: ${objective:CrossReference('TestDescription.testObjective')} + Configuration: ${configuration:CrossReference('TestDescription.testConfiguration')} + Expected behaviour + ensure that + when + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + + then + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + + + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Purpose Description - Full Template" enabled="true" id="org.etsi.mts.tdl.tx.templates.Test.Purpose.Description.-.Full" name="Test Purpose Description - Full">Test Purpose Description ${tpdName} + Objective: ${objective:CrossReference('TestDescription.testObjective')} + Configuration: ${configuration:CrossReference('TestDescription.testConfiguration')} + Initial conditions + with + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + + Expected behaviour + ensure that + when + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + + then + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + + + Final conditions + with + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeConstraint" deleted="false" description="Time Constraint" enabled="true" id="org.etsi.mts.tdl.tx.templates.Time.Constraint" name="Time Constraint">${constraint}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeLabel" deleted="false" description="Time Label" enabled="true" id="org.etsi.mts.tdl.tx.templates.Time.Label" name="Time Label">${timeLabel}=now</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeLabelUse" deleted="false" description="Time Label Use" enabled="true" id="org.etsi.mts.tdl.tx.templates.Time.Label.Use" name="Time Label Use">@${timeLabel:CrossReference(TimeLabelUse.timeLabel)}.${last}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimerStart" deleted="false" description="Timer Start" enabled="true" id="org.etsi.mts.tdl.tx.templates.Timer.Start" name="Timer Start">start ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)} for ${period:CrossReference(DataElementUse.dataElement)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimerStop" deleted="false" description="Timer Stop" enabled="true" id="org.etsi.mts.tdl.tx.templates.Timer.Stop" name="Timer Stop">stop ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeOut" deleted="false" description="Timer Timeout" enabled="true" id="org.etsi.mts.tdl.tx.templates.Timer.Timeout" name="Timer Timeout">timeout on ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.UnboundedLoopBehaviour" deleted="false" description="Unbounded Loop Behaviour" enabled="true" id="org.etsi.mts.tdl.tx.templates.Unbounded.Loop.Behaviour" name="Unbounded Loop Behaviour">while [${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ValueAssignmentMessage" deleted="false" description="Value Assignment Message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Value.Assignment.Message" name="Value Assignment Message">where it is assigned to ${variable:CrossReference(ValueAssignment.variable)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ValueAssignmentProcedure" deleted="false" description="Value Assignment Procedure" enabled="true" id="org.etsi.mts.tdl.tx.templates.Value.Assignment.Procedure" name="Value Assignment Procedure">where ${parameter:CrossReference(ValueAssignment.parameter)} is assigned to ${variable:CrossReference(ValueAssignment.variable)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Variable" deleted="false" description="Variable" enabled="true" id="org.etsi.mts.tdl.tx.templates.Variable" name="Variable">variable ${type:CrossReference(Variable.dataType)} ${variableName}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Variant" deleted="false" description="Variant" enabled="true" id="org.etsi.mts.tdl.tx.templates.Variant" name="Variant">Variant ${variantName} + Objective: "${objective}" + Reference: "${reference}" + Bindings + value ${content:CrossReference(LiteralValueReference.content)} set to ${newValue} + ${cursor} + +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.VariantBindingValue" deleted="false" description="Variant Value Bindings" enabled="true" id="org.etsi.mts.tdl.tx.templates.Variant.Value.Bindings" name="Variant Value Bindings">value ${content:CrossReference(LiteralValueReference.content)} set to ${newValue}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.VerdictAssignment" deleted="false" description="Verdict Assignment" enabled="true" id="org.etsi.mts.tdl.tx.templates.Verdict.Assignment" name="Verdict Assignment">set verdict to ${dataElement:CrossReference(DataElementUse.dataElement)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Wait" deleted="false" description="Wait" enabled="true" id="org.etsi.mts.tdl.tx.templates.Wait" name="Wait">wait for ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(TimeOperation.componentInstance)}</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Behaviour" deleted="false" description="With Behaviour Fragment" enabled="true" id="org.etsi.mts.tdl.tx.templates.With.Behaviour.Fragment" name="With Behaviour Fragment">with + ${cursor} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Behaviour" deleted="false" description="With Behaviour Objective Fragment" enabled="true" id="org.etsi.mts.tdl.tx.templates.With.Behaviour.Objective.Fragment" name="With Behaviour Objective Fragment">with + Objective: ${testObjective:CrossReference(Behaviour.testObjective)} +</template> +<template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.CombinedBehaviour" deleted="false" description="With Combined Behaviour Fragment" enabled="true" id="org.etsi.mts.tdl.tx.templates.With.Combined.Behaviour.Fragment" name="With Combined Behaviour Fragment">with + Objective: ${testObjective:CrossReference(Behaviour.testObjective)} + ${cursor} +</template></templates> \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xmlback b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xmlback new file mode 100644 index 0000000000000000000000000000000000000000..9801be16b2852be02bc72285e8ad5d2fee8a5f9b --- /dev/null +++ b/plugins/org.etsi.mts.tdl.txi.ui/templates/templates.xmlback @@ -0,0 +1,281 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Action" deleted="false" description="Action with Body" enabled="true" name="Action">Action ${actionName} : "${body}"</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ActionReference" deleted="false" description="Action Reference" enabled="true" name="Action Reference">perform ${action:CrossReference(ActionReference.action)} on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AlternativeBehaviour" deleted="false" description="Alternative Behaviour with two Blocks" enabled="true" name="Alternative Behaviour with two Blocks">alternatively { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} or { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_argument" deleted="false" description="Argument Replacement" enabled="true" name="Argument Replacement">argument replaced by ${newValue}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Assertion" deleted="false" description="Assertion" enabled="true" name="Assertion">assert ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)} otherwise ${dataElement:CrossReference(DataElementUse.dataElement)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Assignment" deleted="false" description="Assignment" enabled="true" name="Assignment">${componentInstance:CrossReference(VariableUse.componentInstance)}::${variable:CrossReference(VariableUse.variable)} = ${dataElement:CrossReference(DataElementUse.dataElement)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PredefinedFunctionCall" deleted="false" description="Binary Predefined Function Call" enabled="true" name="Binary Predefined Function Call">${left:CrossReference(PredefinedFunctionCall.actualParameters)} ${function:CrossReference(PredefinedFunctionCall.function)} ${right:CrossReference(PredefinedFunctionCall.actualParameters)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PredefinedFunctionCall" deleted="false" description="Binary Predefined Function Call with Parentheses" enabled="true" name="Binary Predefined Function Call with Parentheses">(${left:CrossReference(PredefinedFunctionCall.actualParameters)} ${function:CrossReference(PredefinedFunctionCall.function)} ${right:CrossReference(PredefinedFunctionCall.actualParameters)})</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.BoundedLoopBehaviour" deleted="false" description="Bounded Loop Behaviour" enabled="true" name="Bounded Loop Behaviour">repeat ${numIteration:CrossReference(DataElementUse.dataElement)} times on ${componentInstance:CrossReference(LocalExpression.componentInstance)} { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Collection Data Instance" enabled="true" name="Collection Data Instance">${dataType:CrossReference(DataInstance.dataType)} ${name} [ ${dataElement:CrossReference(DataElementUse.dataElement)}${cursor} ] +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Collection Data Type" enabled="true" name="Collection Data Type">Collection ${name} of ${itemType:CrossReference(CollectionDataType.itemType)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ComponentInstance" deleted="false" description="Component Instance" enabled="true" name="Component Instance">${componentType:CrossReference(ComponentInstance.type)} ${componentName} as ${role:Enum(ComponentInstanceRole)}, +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ComponentInstanceBinding" deleted="false" description="Component Instance Binding" enabled="true" name="Component Instance Binding">${formalComponent:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent:CrossReference(ComponentInstanceBinding.actualComponent)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Component Type" enabled="true" name="Component Type">Component ${componentTypeName} { + gate ${gateType} ${gateName} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.CompoundBehaviour" deleted="false" description="Compound Behaviour" enabled="true" name="Compound Behaviour">{ + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ConditionalBehaviour" deleted="false" description="Conditional Behaviour" enabled="true" name="Conditional Behaviour">if [ ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ConditionalBehaviour" deleted="false" description="Conditional Behaviour with else Block" enabled="true" name="Conditional Behaviour with else Block">if [ ${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} else { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Connection" deleted="false" description="Connection" enabled="true" name="Connection">connect ${component1:CrossReference(GateReference.component)}::${gate1:CrossReference(GateReference.gate)} to ${component2:CrossReference(GateReference.component)}::${gate2:CrossReference(GateReference.gate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Connection" deleted="false" description="Connection with named Gate References" enabled="true" name="Connection with Names">connect ${gateReference1}=${component1:CrossReference(GateReference.component)}::${gate1:CrossReference(GateReference.gate)} to ${gateReference2}=${component2:CrossReference(GateReference.component)}::${gate2:CrossReference(GateReference.gate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_containing" deleted="false" description="Content" enabled="true" name="Content">containing { + ${contentName} ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Assigment" enabled="true" name="Content Assignment">${contentName} set to ${contentValue} ${cursor} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Nested" enabled="true" name="Content Nested">${contentName} containing { + ${contentValue} ${cursor} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Reference" enabled="true" name="Content Reference">corresponding to the value contained in ${content:CrossReference(ContentReference.content)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Reference Assignment" enabled="true" name="Content Reference Assignment">${contentName} corresponding to the value contained in ${content:CrossReference(ContentReference.content)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Value Assignment" enabled="true" name="Content Value Assignment">set to ${contentValue}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Value" deleted="false" description="Content Value Reference" enabled="true" name="Content Value Reference">corresponding to the value of ${content:CrossReference(LiteralValueReference.content)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataContent" deleted="false" description="Content Value Reference Assignment" enabled="true" name="Content Value Reference Assignment">${contentName} corresponding to the value of ${content:CrossReference(LiteralValueReference.content)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.kw_containing" deleted="false" description="Content with Assignment" enabled="true" name="Content with Assignment">containing { + ${contentName} set to ${contentValue}${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataElementMapping" deleted="false" description="Data Element Mapping" enabled="true" name="Data Element Mapping">Map ${dataElement:CrossReference(DataElementMapping.mappableDataElement)} to "${uri}" in ${dataResourceMapping:CrossReference(DataElementMapping.dataResourceMapping)} as ${dataElement}_MAPPING</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataElementMapping" deleted="false" description="Data Element Mapping with Parameter Mapping" enabled="true" name="Data Element Mapping with Parameter Mapping">Map ${dataElement:CrossReference(DataElementMapping.mappableDataElement)} to "${uri}" in ${dataResourceMapping:CrossReference(DataElementMapping.dataResourceMapping)} as ${dataElement}_MAPPING { + ${parameter:CrossReference(ParameterMapping.parameter)} -> "${parameterUri}" +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DataResourceMapping" deleted="false" description="Data Resource Mapping" enabled="true" name="Data Resource Mapping">Use "${uri}" as ${mappingName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.DefaultBehaviour" deleted="false" description="Default Behaviour" enabled="true" name="Default Behaviour">default on ${guardedComponent:CrossReference(ExceptionalBehaviour.guardedComponent)} { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EntityBinding" deleted="false" description="Entity Binding" enabled="true" name="Entity Binding">the ${entity:CrossReference(EntityReference.entity)} entity replaced by the ${newEntity:CrossReference(EntityReference.entity)} entity +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Enumeration Data Type" enabled="true" name="Enumeration">Enumerated ${name} { + ${name} ${enumInstanceName}${cursor} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventOccurrenceSpecification" deleted="false" description="Event occurrence specification" enabled="true" name="Event occurrence specification">the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventOccurrenceSpecification" deleted="false" description="Event occurrence specification with conjunction" enabled="true" name="Event occurrence specification with conjunction">${conjuction} +the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventSpecificationTemplate" deleted="false" description="Event Specification Template" enabled="true" name="Event Specification Template">Template ${templateName} { + the ${entity:CrossReference(EntityReference.entity)} entity ${event:CrossReference(EventReference.event)} a ${argument} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventTemplateOccurrence" deleted="false" description="Event Template Occurrence" enabled="true" name="Event Template Occurrence">${conjunction} +event ${eventTemplate:CrossReference(EventTemplateOccurrence.eventTemplate)} occurs +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.EventTemplateOccurrence" deleted="false" description="Event Template Occurrence with Bindings" enabled="true" name="Event Template Occurrence with Bindings">${conjunction} +event ${eventTemplate:CrossReference(EventTemplateOccurrence.eventTemplate)} occurs with { + the ${entity:CrossReference(EntityReference.entity)} entity replaced by the ${newEntity:CrossReference(EntityReference.entity)} entity + argument replaced by a ${newArgument} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviour" deleted="false" description="Expected behaviour (then clause only) in Structured Test Objective" enabled="true" name="Expected behaviour (then clause only) in Structured Test Objective">Expected behaviour +ensure that { + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviourBehaviour" deleted="false" description="Expected Behaviour (then clause only) in Test Purpose Description" enabled="true" name="Expected Behaviour (then clause only) in Test Purpose Description">Expected behaviour +ensure that { + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviour" deleted="false" description="Expected behaviour in Structured Test Objective" enabled="true" name="Expected behaviour in Structured Test Objective">Expected behaviour +ensure that { + when { + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} + } + then { + the ${entity:CrossReference(EntityReference.entity)} entity ${thenEvent:CrossReference(EventReference.event)} a ${thenArgument} + } +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ExpectedBehaviourBehaviour" deleted="false" description="Expected Behaviour in Test Purpose Description" enabled="true" name="Expected Behaviour in Test Purpose Description">Expected behaviour +ensure that { + when { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + } + then { + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + } +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FinalConditions" deleted="false" description="Final conditions in Structured Test Objective" enabled="true" name="Final conditions in Structured Test Objective">Final conditions +with { + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FinalConditionsBehaviour" deleted="false" description="Final Conditions in Test Purpose Description" enabled="true" name="Final Conditions in Test Purpose Description">Final conditions +with { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.FormalParameter" deleted="false" description="Formal Parameters" enabled="true" name="Formal Parameters">${parameterDataType:CrossReference(Parameter.dataType)} ${parameterName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Function" deleted="false" description="Function Definition" enabled="true" name="Function">Function ${functionName} returns ${returnType:CrossReference(Function.returnType)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Function" deleted="false" description="Function Definition with Parameter" enabled="true" name="Function with Parameter">Function ${functionName} (${parameterDataType:CrossReference(Parameter.dataType)} ${parameterName}) returns ${returnType:CrossReference(Function.returnType)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.GateInstance" deleted="false" description="Gate Instance" enabled="true" name="Gate Instance">gate ${type:CrossReference(GateInstance.type)} ${gateName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Gate Type" enabled="true" name="Gate Type">${kind:Enum(GateTypeKind)} Gate ${gateTypeName} accepts ${dataType:CrossReference(GateType.dataType)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Import all Elements" enabled="true" name="Import all">Import all from ${importedPackage:CrossReference(Package.importedPackage)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Import individual Elements" enabled="true" name="Import Elements">Import ${variable:cursor} from ${importedPackage:CrossReference(Package.importedPackage)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InitialConditions" deleted="false" description="Initial conditions in Structured Test Objective" enabled="true" name="Initial conditions in Structured Test Objective">Initial conditions +with { + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InitialConditionsBehaviour" deleted="false" description="Initial Conditions in Test Purpose Description" enabled="true" name="Initial Conditions in Test Purpose Description">Initial conditions +with { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InlineAction" deleted="false" description="Inline Action" enabled="true" name="Inline Action">perform action: "${body}" on ${componentInstance:CrossReference(ActionBehaviour.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.InterruptBehaviour" deleted="false" description="Interrupt Behaviour" enabled="true" name="Interrupt Behaviour">interrupt on ${guardedComponent:CrossReference(ExceptionalBehaviour.guardedComponent)} { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.LocalExpression" deleted="false" description="Local Expression" enabled="true" name="Local Expression">${expression:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.LocalExpression" deleted="false" description="Local Loop Expression" enabled="true" name="Local Loop Expression">${expression:CrossReference(DataElementUse.dataElement)} times on ${componentInstance:CrossReference(LocalExpression.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Member" deleted="false" description="Member" enabled="true" name="Member">${dataType:CrossReference(Parameter.dataType)} ${memberName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.MemberAssignment" deleted="false" description="Member Assignment" enabled="true" name="Member Assignment">${member:CrossReference(MemberAssignment.member)} = ${dataElement:CrossReference(DataElementUse.dataElement)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Test objective" enabled="true" name="Objective">Objective ${name} { + Description: "${description}" + References: "${reference}" +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.OptionalBehaviour" deleted="false" description="Optional Behaviour" enabled="true" name="Optional Behaviour">optionally { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.OptionalBehaviour" deleted="false" description="Optional Behaviour with Guard" enabled="true" name="Optional Behaviour with Guard">optionally [${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Empty Package" enabled="true" name="Package - Empty ">Package ${packageName} { + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Example Package structure" enabled="true" id="org.etsi.mts.tdl.tx.templates.Package" name="Package - Example ">Package ${name} { + Type integer + Type string + Message Gate http accepts string, integer + Component node { + gate http interface + } + Configuration base { + node sut as SUT, + node tester as Tester, + connect sut::interface to tester::interface + } + Test example uses base { + tester::interface sends "hello" to sut::interface + } +} + +</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 + ${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)} +} in parallel to { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} and { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParallelBehaviour" deleted="false" description="Parallel Behaviour with two Blocks" enabled="true" name="Parallel Behaviour with two Blocks">run { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} in parallel to { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParameterBinding" deleted="false" description="Parameter Binding" enabled="true" name="Parameter Binding">${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ParameterMapping" deleted="false" description="Parameter Mapping" enabled="true" name="Parameter Mapping">${parameter:CrossReference(ParameterMapping.parameter)} -> "${uri}"</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PeriodicBehaviour" deleted="false" description="Periodic Behaviour" enabled="true" name="Periodic Behaviour">every ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)} { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureCall" deleted="false" description="Procedure Call" enabled="true" name="Procedure Call">${referenceName}: ${sourceGate:CrossReference(Interaction.sourceGate)} calls ${signature:CrossReference(ProcedureCall.signature)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}) on ${targetGate:CrossReference(Target.targetGate)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureCallResponse" deleted="false" description="Procedure Call Response" enabled="true" name="Procedure Call Response">${replyTo:CrossReference(ProcedureCall.replyTo)}: ${sourceGate:CrossReference(Interaction.sourceGate)} responds with ${signature:CrossReference(ProcedureCall.signature)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataElement:CrossReference(DataElementUse.dataElement)}) to ${targetGate:CrossReference(Target.targetGate)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureParameter" deleted="false" description="Procedure Parameter" enabled="true" name="Procedure Parameter">${in} ${parameterType:CrossReference(ProcedureParameter.dataType)} ${parameterName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ProcedureSignature" deleted="false" description="Procedure Signature" enabled="true" name="Procedure Signature">Signature ${procedureName} (${in} ${parameterType:CrossReference(ProcedureParameter.dataType)} ${parameterName})</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Quiescence" deleted="false" description="Quiescence on Component" enabled="true" name="Quiescence on Component">quiet for ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(TimeOperation.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Quiescence" deleted="false" description="Quiescence on Gate" enabled="true" name="Quiescence on Gate">quiet for ${period:CrossReference(DataElementUse.dataElement)} on gate ${gateReference:CrossReference(Quiescence.gateReference)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Receive a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Receive.message" name="Receive message">${targetGate:CrossReference(Target.targetGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${source:CrossReference(Interaction.sourceGate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.AtomicBehaviour" deleted="false" description="Send a message" enabled="true" id="org.etsi.mts.tdl.tx.templates.Send.message" name="Send message">${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.SimpleDataInstance" deleted="false" description="Simple Data or Enumeration Instance" enabled="true" name="Simple Data or Enumeration Instance">${dataType:CrossReference(DataInstance.dataType)} ${enumInstanceName}${cursor}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Structured Data Instsance" enabled="true" name="Structured Data Instance">${dataType:CrossReference(DataInstance.dataType)} ${name} ( + ${member:CrossReference(MemberAssignment.member)} = ${dataElement:CrossReference(DataElementUse.dataElement)}${cursor} +)</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Empty Structured Data Type definition" enabled="true" name="Structured Data Type">Structure ${name} ( + +) +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.PackageableElement" deleted="false" description="Structured Data Type with one Member" enabled="true" name="Structured Data Type with Member">Structure ${name} ( + ${dataType:CrossReference(Parameter.dataType)} ${memberName}${cursor} +) +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.StructuredTestObjective" deleted="false" description="Structured Test Objective full" enabled="true" name="Structured Test Objective full">Test Purpose ${tpName} { + Objective: "${description}" + Reference: "${reference}" + Initial conditions + with { + the ${entity:CrossReference(EntityReference.entity)} entity ${initialEvent:CrossReference(EventReference.event)} + } + Expected behaviour + ensure that { + when { + the ${entity:CrossReference(EntityReference.entity)} entity ${whenEvent:CrossReference(EventReference.event)} a ${whenArgument} + } + then { + the ${entity:CrossReference(EntityReference.entity)} entity ${thenEvent:CrossReference(EventReference.event)} a ${thenArgument} + } + } + Final conditions + with { + the ${entity:CrossReference(EntityReference.entity)} entity ${finalEvent:CrossReference(EventReference.event)} + } +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.StructuredTestObjective" deleted="false" description="Structured Test Objective minimal " enabled="true" name="Structured Test Objective minimal">Test Purpose ${tpName} { + Objective: "${description}" + Reference: "${reference}" + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Basic Test Configuration" enabled="true" name="Test Configuration">Configuration ${testConfigurationName} { + ${componentType:CrossReference(ComponentInstance.type)} ${sut} as SUT, + ${componentType:CrossReference(ComponentInstance.type)} ${tester} as Tester, + connect ${sut}::${sutGate:CrossReference(GateReference.gate)} to ${tester}::${testerGate:CrossReference(GateReference.gate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Example Test Configuraiton with necessary component and gate types" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration" name="Test Configuration Example ">Configuration ${testConfigurationName} { + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} +} +Message Gate ${gateType} accepts ${accepted} +Component ${componentType} { + gate ${gateType} ${interfaceName} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Example Test Configuraiton with necessary component and gate types" enabled="true" name="Test Configuration Example (refined)">Message Gate ${gateTypeName} accepts ${accepted} + +Component ${componentTypeName} { + gate ${gateTypeName:CrossReference(GateInstance.type)} ${gateName} +} + +Configuration ${testConfigurationName} { + ${componentTypeName:CrossReference(ComponentInstance.type)} ${sutName} as SUT, + ${componentTypeName:CrossReference(ComponentInstance.type)} ${testerName} as Tester, + connect ${testerName:CrossReference(GateReference.component)}::${gateName:CrossReference(GateReference.gate)} to ${sutName:CrossReference(GateReference.component)}::${gateName:CrossReference(GateReference.gate)} +} + +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestConfiguration" deleted="false" description="Alternative template for example Test Configuration" enabled="true" id="org.etsi.mts.tdl.tx.templates.Configuration.in" name="Test Configuration Example - Alternative">Configuration example${name} { + ${componentType} sut as SUT, + ${componentType} tester as Tester, + connect sut::${interfaceName} to tester::${interfaceName} +} +Message Gate ${gateType} accepts ${dataType:CrossReference('GateType.dataType')} +Component ${componentType} { + gate ${gateType} ${interfaceName} +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description" enabled="true" name="Test Description">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)} { + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description Declaration without any behaviour " enabled="true" name="Test Description Declaration">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference" enabled="true" name="Test Description Reference">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference with Parameters" enabled="true" name="Test Description Reference with Parameters">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataUse})</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescriptionReference" deleted="false" description="Test Description Reference with Parameters and Bindings" enabled="true" name="Test Description Reference with Parameters and Bindings">execute ${testDescription:CrossReference(TestDescriptionReference.testDescription)} (${parameter:CrossReference(ParameterBinding.parameter)} = ${dataUse}) { + ${formalComponent1:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent1:CrossReference(ComponentInstanceBinding.actualComponent)}, + ${formalComponent2:CrossReference(ComponentInstanceBinding.formalComponent)} -> ${actualComponent2:CrossReference(ComponentInstanceBinding.actualComponent)} + //TODO: add other bindings if needed + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Description with Basic Interactions" enabled="true" name="Test Description with Basic Interactions">Test Description ${testDescriptionName} uses ${testConfiguration:CrossReference(TestDescription.testConfiguration)} { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Package" deleted="false" description="Test Objective" enabled="true" id="org.etsi.mts.tdl.tx.templates.Objective" name="Test Objective">Objective ${name} { + Description: "${description}" + References: "${reference}" +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Purpose Description - Expected Behaviour Only Template" enabled="true" id="org.etsi.mts.tdl.tx.templates.TestPurposeDescription" name="Test Purpose Description - Expected Behaviour Only">Test Purpose Description ${tpdName} { + Objective: ${objective:CrossReference('TestDescription.testObjective')} + Configuration: ${configuration:CrossReference('TestDescription.testConfiguration')} + Expected behaviour + ensure that { + when { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + } + then { + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + } + } +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TestDescription" deleted="false" description="Test Purpose Description - Full Template" enabled="true" name="Test Purpose Description - Full">Test Purpose Description ${tpdName} { + Objective: ${objective:CrossReference('TestDescription.testObjective')} + Configuration: ${configuration:CrossReference('TestDescription.testConfiguration')} + Initial conditions + with { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + } + Expected behaviour + ensure that { + when { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + } + then { + ${source:CrossReference(Interaction.sourceGate)} receives ${dataElement:CrossReference(DataElementUse.dataElement)} from ${targetGate:CrossReference(Target.targetGate)} + } + } + Final conditions + with { + ${source:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} + } +} +</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeConstraint" deleted="false" description="Time Constraint" enabled="true" name="Time Constraint">${constraint}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeLabel" deleted="false" description="Time Label" enabled="true" name="Time Label">${timeLabel}=now</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeLabelUse" deleted="false" description="Time Label Use" enabled="true" name="Time Label Use">@${timeLabel:CrossReference(TimeLabelUse.timeLabel)}.${last}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimerStart" deleted="false" description="Timer Start" enabled="true" name="Timer Start">start ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)} for ${period:CrossReference(DataElementUse.dataElement)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimerStop" deleted="false" description="Timer Stop" enabled="true" name="Timer Stop">stop ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.TimeOut" deleted="false" description="Timer Timeout" enabled="true" name="Timer Timeout">timeout on ${componentInstance:CrossReference(TimerOperation.componentInstance)}::${timer:CrossReference(TimerOperation.timer)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.UnboundedLoopBehaviour" deleted="false" description="Unbounded Loop Behaviour" enabled="true" name="Unbounded Loop Behaviour">while [${condition:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(LocalExpression.componentInstance)}] { + ${sourceGate:CrossReference(Interaction.sourceGate)} sends ${dataElement:CrossReference(DataElementUse.dataElement)} to ${targetGate:CrossReference(Target.targetGate)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ValueAssignmentMessage" deleted="false" description="Value Assignment Message" enabled="true" name="Value Assignment Message">where it is assigned to ${variable:CrossReference(ValueAssignment.variable)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.ValueAssignmentProcedure" deleted="false" description="Value Assignment Procedure" enabled="true" name="Value Assignment Procedure">where ${parameter:CrossReference(ValueAssignment.parameter)} is assigned to ${variable:CrossReference(ValueAssignment.variable)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Variable" deleted="false" description="Variable" enabled="true" name="Variable">variable ${type:CrossReference(Variable.dataType)} ${variableName}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Variant" deleted="false" description="Variant" enabled="true" name="Variant">Variant ${variantName} { + Objective: "${objective}" + Reference: "${reference}" + Bindings { + value ${content:CrossReference(LiteralValueReference.content)} set to ${newValue} + ${cursor} + } +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.VariantBindingValue" deleted="false" description="Variant Value Bindings" enabled="true" name="Variant Value Bindings">value ${content:CrossReference(LiteralValueReference.content)} set to ${newValue}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.VerdictAssignment" deleted="false" description="Verdict Assignment" enabled="true" name="Verdict Assignment">set verdict to ${dataElement:CrossReference(DataElementUse.dataElement)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Wait" deleted="false" description="Wait" enabled="true" name="Wait">wait for ${period:CrossReference(DataElementUse.dataElement)} on ${componentInstance:CrossReference(TimeOperation.componentInstance)}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Behaviour" deleted="false" description="With Behaviour Fragment" enabled="true" name="With Behaviour Fragment">with { + ${cursor} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.Behaviour" deleted="false" description="With Behaviour Objective Fragment" enabled="true" name="With Behaviour Objective Fragment">with { + Objective: ${testObjective:CrossReference(Behaviour.testObjective)} +}</template><template autoinsert="true" context="org.etsi.mts.tdl.TDLtx.CombinedBehaviour" deleted="false" description="With Combined Behaviour Fragment" enabled="true" name="With Combined Behaviour Fragment">with { + Objective: ${testObjective:CrossReference(Behaviour.testObjective)} + ${cursor} +}</template></templates> \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.txi/src/org/etsi/mts/tdl/GenerateTDLtxi.mwe2 b/plugins/org.etsi.mts.tdl.txi/src/org/etsi/mts/tdl/GenerateTDLtxi.mwe2 index 84de114892ed37b9f4880e56bdb7050543a13d62..02bdeb346cbccbc1922fa2f7da24a7b219d62e13 100644 --- a/plugins/org.etsi.mts.tdl.txi/src/org/etsi/mts/tdl/GenerateTDLtxi.mwe2 +++ b/plugins/org.etsi.mts.tdl.txi/src/org/etsi/mts/tdl/GenerateTDLtxi.mwe2 @@ -47,6 +47,20 @@ Workflow { generator = { generateXtendStub = false } + + projectWizard = { + generate = true + generateToolbarButton = true + pluginProject = false + } + fileWizard = { + generate = true + generateToolbarButton = true + } + renameRefactoring = { + useChangeSerializer = true + } + junitSupport = { junitVersion = "5" }