Skip to content
Snippets Groups Projects
Commit a320b31d authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added initial wizards for TXi (in progress)

parent 44133b50
No related branches found
No related tags found
No related merge requests found
Showing
with 1977 additions and 4 deletions
...@@ -17,10 +17,15 @@ Require-Bundle: org.etsi.mts.tdl.txi, ...@@ -17,10 +17,15 @@ Require-Bundle: org.etsi.mts.tdl.txi,
org.eclipse.ui.ide;bundle-version="3.5.0", org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.ui, org.eclipse.ui,
org.eclipse.compare, 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 Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-RequiredExecutionEnvironment: JavaSE-11
Export-Package: org.etsi.mts.tdl.ui.contentassist, Export-Package: org.etsi.mts.tdl.ui.contentassist,
org.etsi.mts.tdl.txi.ui.internal, 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 Bundle-Activator: org.etsi.mts.tdl.txi.ui.internal.TxiActivator
...@@ -3,5 +3,7 @@ source.. = src/,\ ...@@ -3,5 +3,7 @@ source.. = src/,\
xtend-gen/ xtend-gen/
bin.includes = .,\ bin.includes = .,\
META-INF/,\ META-INF/,\
plugin.xml plugin.xml,\
templates/,\
icons/
bin.excludes = **/*.xtend bin.excludes = **/*.xtend
plugins/org.etsi.mts.tdl.txi.ui/icons/file_template.png

508 B

plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_file.png

487 B

plugins/org.etsi.mts.tdl.txi.ui/icons/new_TDLtxi_proj.gif

1.73 KiB

plugins/org.etsi.mts.tdl.txi.ui/icons/project_template.png

493 B

...@@ -12,7 +12,14 @@ ...@@ -12,7 +12,14 @@
name="TDLtxi Editor"> name="TDLtxi Editor">
</editor> </editor>
</extension> </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"> point="org.eclipse.ui.handlers">
<handler <handler
class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" class="org.etsi.mts.tdl.ui.TDLtxiExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
...@@ -431,4 +438,105 @@ ...@@ -431,4 +438,105 @@
type="text"> type="text">
</fileTypes> </fileTypes>
</extension> </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> </plugin>
<?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>
/*
* 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() {
}
}
/*
* 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
// ))
// }
// }
//
//}
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»''')
}
}
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»''')
}
}
/*
* 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
]
}
}
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>
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
)
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
<?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
This diff is collapsed.
This diff is collapsed.
...@@ -47,6 +47,20 @@ Workflow { ...@@ -47,6 +47,20 @@ Workflow {
generator = { generator = {
generateXtendStub = false generateXtendStub = false
} }
projectWizard = {
generate = true
generateToolbarButton = true
pluginProject = false
}
fileWizard = {
generate = true
generateToolbarButton = true
}
renameRefactoring = {
useChangeSerializer = true
}
junitSupport = { junitSupport = {
junitVersion = "5" junitVersion = "5"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment