From 174df20dd9a07d37facf36070b7c919250cb9df3 Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Fri, 3 Nov 2023 10:49:32 +0100 Subject: [PATCH 1/5] - removed dummy project files --- .../src/org/etsi/mts/tdl/constraints/ui/handlers/.project | 1 - .../src/org/etsi/mts/tdl/importers/ui/handlers/.project | 1 - .../src/org/etsi/mts/tdl/tools/rt/ui/handlers/.project | 1 - .../src/org/etsi/mts/tdl/tools/to/docx/poi/ui/handlers/.project | 1 - .../src/org/etsi/mts/tdl/ttcn3/ui/handlers/.project | 1 - 5 files changed, 5 deletions(-) delete mode 100644 plugins/org.etsi.mts.tdl.constraints.ui/src/org/etsi/mts/tdl/constraints/ui/handlers/.project delete mode 100644 plugins/org.etsi.mts.tdl.importers.ui/src/org/etsi/mts/tdl/importers/ui/handlers/.project delete mode 100644 plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/ui/handlers/.project delete mode 100644 plugins/org.etsi.mts.tdl.tools.to.docx.poi.ui/src/org/etsi/mts/tdl/tools/to/docx/poi/ui/handlers/.project delete mode 100644 plugins/org.etsi.mts.tdl.ttcn3.ui/src/org/etsi/mts/tdl/ttcn3/ui/handlers/.project diff --git a/plugins/org.etsi.mts.tdl.constraints.ui/src/org/etsi/mts/tdl/constraints/ui/handlers/.project b/plugins/org.etsi.mts.tdl.constraints.ui/src/org/etsi/mts/tdl/constraints/ui/handlers/.project deleted file mode 100644 index b6e59aeb..00000000 --- a/plugins/org.etsi.mts.tdl.constraints.ui/src/org/etsi/mts/tdl/constraints/ui/handlers/.project +++ /dev/null @@ -1 +0,0 @@ -DUMMY \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.importers.ui/src/org/etsi/mts/tdl/importers/ui/handlers/.project b/plugins/org.etsi.mts.tdl.importers.ui/src/org/etsi/mts/tdl/importers/ui/handlers/.project deleted file mode 100644 index b6e59aeb..00000000 --- a/plugins/org.etsi.mts.tdl.importers.ui/src/org/etsi/mts/tdl/importers/ui/handlers/.project +++ /dev/null @@ -1 +0,0 @@ -DUMMY \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/ui/handlers/.project b/plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/ui/handlers/.project deleted file mode 100644 index b6e59aeb..00000000 --- a/plugins/org.etsi.mts.tdl.rt.ui/src/org/etsi/mts/tdl/tools/rt/ui/handlers/.project +++ /dev/null @@ -1 +0,0 @@ -DUMMY \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.tools.to.docx.poi.ui/src/org/etsi/mts/tdl/tools/to/docx/poi/ui/handlers/.project b/plugins/org.etsi.mts.tdl.tools.to.docx.poi.ui/src/org/etsi/mts/tdl/tools/to/docx/poi/ui/handlers/.project deleted file mode 100644 index b6e59aeb..00000000 --- a/plugins/org.etsi.mts.tdl.tools.to.docx.poi.ui/src/org/etsi/mts/tdl/tools/to/docx/poi/ui/handlers/.project +++ /dev/null @@ -1 +0,0 @@ -DUMMY \ No newline at end of file diff --git a/plugins/org.etsi.mts.tdl.ttcn3.ui/src/org/etsi/mts/tdl/ttcn3/ui/handlers/.project b/plugins/org.etsi.mts.tdl.ttcn3.ui/src/org/etsi/mts/tdl/ttcn3/ui/handlers/.project deleted file mode 100644 index b6e59aeb..00000000 --- a/plugins/org.etsi.mts.tdl.ttcn3.ui/src/org/etsi/mts/tdl/ttcn3/ui/handlers/.project +++ /dev/null @@ -1 +0,0 @@ -DUMMY \ No newline at end of file -- GitLab From 44133b504b5afd69929af84a336187d1ec35341b Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Fri, 3 Nov 2023 11:18:21 +0100 Subject: [PATCH 2/5] + added start to permitted common word qualifiers --- plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext b/plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext index e05c666c..6d1f229f 100644 --- a/plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext +++ b/plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext @@ -1156,6 +1156,7 @@ CommonWordQualifier returns tdl::Comment: | body='from' | body='to' | body='of' + | body='start' ; DirectionQualifier returns tdl::Comment: -- GitLab From 6a0a5fd68cf20b7f8722062530d2a96504c92bb5 Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Fri, 3 Nov 2023 13:07:59 +0100 Subject: [PATCH 3/5] + fix for DataElementUse::FunctionCallParameters constraint (propagate to part 1) --- plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl b/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl index 6bc9670b..dd518304 100644 --- a/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl +++ b/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl @@ -420,6 +420,8 @@ context DataElementUse -- Matching parameters for 'Function's inv FunctionCallParameters ('All \'FormalParameter\'s shall be bound if the \'dataElement\' refers to a \'Function\'.' + self.toString()): + self.dataElement.oclIsUndefined() + or not self.dataElement.oclIsKindOf(Function) or self.dataElement.oclAsType(Function).formalParameter->forAll(p | self.argument->exists(a | a.parameter = p)) -- GitLab From d3cf9d457574037ed732ebad25d5e1ad263a90af Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Fri, 3 Nov 2023 13:08:36 +0100 Subject: [PATCH 4/5] * address unitialised editor issue in import wizard --- .../wizards/importWizards/ImportWizardPage.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/org.etsi.mts.tdl.wizards/src/org/etsi/mts/tdl/wizards/importWizards/ImportWizardPage.java b/plugins/org.etsi.mts.tdl.wizards/src/org/etsi/mts/tdl/wizards/importWizards/ImportWizardPage.java index cb4c3d56..fc4d17f8 100644 --- a/plugins/org.etsi.mts.tdl.wizards/src/org/etsi/mts/tdl/wizards/importWizards/ImportWizardPage.java +++ b/plugins/org.etsi.mts.tdl.wizards/src/org/etsi/mts/tdl/wizards/importWizards/ImportWizardPage.java @@ -182,12 +182,16 @@ public class ImportWizardPage extends WizardNewFileCreationPage { protected boolean validatePage() { boolean validatePage = super.validatePage(); //basic check for referenced data file - IPath sourcePath = Path.fromOSString(this.editor.getStringValue()); - boolean exists = sourcePath.toFile().exists(); - if (!exists) { - setErrorMessage("The selected data file path is not valid."); + if (this.editor != null) { + IPath sourcePath = Path.fromOSString(this.editor.getStringValue()); + boolean exists = sourcePath.toFile().exists(); + if (!exists) { + setErrorMessage("The selected data file path is not valid."); + } + return exists && validatePage; + } else { + return false; } - return exists && validatePage; } private void flattenDataDefinitions(SelectionEvent e) { -- GitLab From ed18f5693b1f1719ca4b6841da1424e27d901b23 Mon Sep 17 00:00:00 2001 From: Philip Makedonski Date: Fri, 3 Nov 2023 13:16:33 +0100 Subject: [PATCH 5/5] - removed keyword filter (redundant?) --- .../org/etsi/mts/tdl/transform/AbstractTranslator.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/transform/AbstractTranslator.java b/plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/transform/AbstractTranslator.java index 39d497ea..eaab3188 100644 --- a/plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/transform/AbstractTranslator.java +++ b/plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/transform/AbstractTranslator.java @@ -87,10 +87,11 @@ public abstract class AbstractTranslator { public static String cleanName(String name) { //TODO: use keywords filter? // List keywords = List.of("Message", "Time", "Type", "type", "name", "instance", "size", "component"); - List keywords = List.of("Message", "Time", "Type", "instance", "size", "component"); - if (keywords.contains(name)) { - name = "^"+name; - } + //TODO: is this redundant now for TDLtx? +// List keywords = List.of("Message", "Time", "Type", "instance", "size", "component"); +// if (keywords.contains(name)) { +// name = "^"+name; +// } name = name.replaceAll("-", "_") .replaceAll(" ", "_") .replaceAll(":", "_") -- GitLab