Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2021-01-06 14:15:00 +0000
committerCamille Letavernier2021-01-06 14:15:00 +0000
commitcfc1918f4da9e64decae9bf6048b69308335880a (patch)
tree5c7b59274be8fcdbe66769c3f375a41f35a5ff2b
parent9981879998465c0b3b722f4e108d02cec311e61d (diff)
downloadorg.eclipse.papyrus-cfc1918f4da9e64decae9bf6048b69308335880a.tar.gz
org.eclipse.papyrus-cfc1918f4da9e64decae9bf6048b69308335880a.tar.xz
org.eclipse.papyrus-cfc1918f4da9e64decae9bf6048b69308335880a.zip
Bug 569356: [Toolsmiths] Support regeneration ofbugs/569356-incrementalGeneration
ElementTypesConfiguration models https://bugs.eclipse.org/bugs/show_bug.cgi?id=569356 - Preserve the existing Element Type Set ID during incremental generation - Remove unused import
-rw-r--r--plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ConfigurationSetRule.xtend9
-rw-r--r--plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ElementTypeRule.xtend1
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ConfigurationSetRule.xtend b/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ConfigurationSetRule.xtend
index aa99f4e97f7..00c733ee50b 100644
--- a/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ConfigurationSetRule.xtend
+++ b/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ConfigurationSetRule.xtend
@@ -101,6 +101,10 @@ class ConfigurationSetRule {
val newDiff = new DiffImpl();
newDiff.addedStereotypes.addAll(umlProfile.allStereotypes);
+
+ // Only set the identifier for non-incremental generations. For incremental generations,
+ // keep the existing identifier (Even if the user selected a different prefix in the Wizard)
+ identifier = "elementTypes".qualified;
updateElementTypeSet(umlProfile, it, newDiff);
}
@@ -114,10 +118,7 @@ class ConfigurationSetRule {
// Initialize the generation of IDs
umlProfile.setIdentifierBase
- typeSet => [
- identifier = "elementTypes".qualified;
- metamodelNsURI = baseUMLElementTypeSet?.metamodelNsURI ?: UMLPackage.eNS_URI;
- ]
+ typeSet.metamodelNsURI = baseUMLElementTypeSet?.metamodelNsURI ?: UMLPackage.eNS_URI;
for (addedStereotype : diff.addedStereotypes) {
for (ext : addedStereotype.impliedExtensions) {
diff --git a/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ElementTypeRule.xtend b/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ElementTypeRule.xtend
index e5329522261..620cf0b8a77 100644
--- a/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ElementTypeRule.xtend
+++ b/plugins/toolsmiths/assistants/org.eclipse.papyrus.uml.profile.types.generator/src/org/eclipse/papyrus/uml/profile/types/generator/ElementTypeRule.xtend
@@ -37,7 +37,6 @@ import org.eclipse.uml2.uml.NamedElement
import org.eclipse.uml2.uml.Stereotype
import static extension org.eclipse.emf.common.util.URI.decode
-import org.eclipse.papyrus.infra.types.MetamodelTypeConfiguration
/**
* Transformation rule for generating a {@link SpecializationTypeConfiguration} from a UML metaclass {@link Extension}.

Back to the top