From c33bf090ae301abce757edc6969dbd8326084927 Mon Sep 17 00:00:00 2001 From: Florian Noyrit Date: Fri, 29 Jan 2016 11:02:50 +0100 Subject: Improve ElementTypeConfiguration Framework to support: - Advice execution ordering - Prepare Multiple ClientContext in Papyrus Change-Id: I00b5d3d5e090de1b8fc9926c9073913c90dda47e --- .../generator/ui/internal/wizards/BaseElementTypeSetBlock.java | 4 +++- .../profile/elementtypesconfigurations/generator/Identifiers.xtend | 3 +++ .../elementtypesconfigurations/generator/UMLElementTypes.xtend | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/uml/assistants') diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java index 2c9c1c22402..f7a5feed26d 100644 --- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java +++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator.ui/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/ui/internal/wizards/BaseElementTypeSetBlock.java @@ -59,6 +59,8 @@ class BaseElementTypeSetBlock { private static final String UML_ELEMENT_TYPE_SET = "org.eclipse.papyrus.uml.service.types.UMLElementTypeSet"; //$NON-NLS-1$ + private static final String CONTEXT_ID = "org.eclipse.papyrus.infra.services.edit.TypeContext"; + private final GeneratorWizardModel model; private final BiMap elementTypeSets; @@ -67,7 +69,7 @@ class BaseElementTypeSetBlock { super(); this.model = model; - this.elementTypeSets = HashBiMap.create(ElementTypeSetConfigurationRegistry.getInstance().getElementTypeSetConfigurations()); + this.elementTypeSets = HashBiMap.create(ElementTypeSetConfigurationRegistry.getInstance().getElementTypeSetConfigurations().get(CONTEXT_ID)); } public void createControl(Composite parent) { diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/Identifiers.xtend b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/Identifiers.xtend index bd66c65b6df..5c0a0bf4306 100644 --- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/Identifiers.xtend +++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/Identifiers.xtend @@ -39,6 +39,9 @@ class Identifiers { @Accessors final String umlElementTypesSet = "org.eclipse.papyrus.uml.service.types.UMLElementTypeSet" + @Accessors + final String contextId = "org.eclipse.papyrus.infra.services.edit.TypeContext"; + @Accessors String baseElementTypesSet = umlElementTypesSet diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/UMLElementTypes.xtend b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/UMLElementTypes.xtend index dff572732b2..47dae5a4a72 100644 --- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/UMLElementTypes.xtend +++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.elementtypesconfigurations.generator/src/org/eclipse/papyrus/uml/profile/elementtypesconfigurations/generator/UMLElementTypes.xtend @@ -51,7 +51,7 @@ class UMLElementTypes { } def getBaseUMLElementTypeSet() { - ElementTypeSetConfigurationRegistry.getInstance.getElementTypeSetConfigurations().get(umlElementTypesSet) + ElementTypeSetConfigurationRegistry.getInstance.getElementTypeSetConfigurations().get(contextId).get(umlElementTypesSet) } def getBaseUMLElementTypes() { @@ -76,7 +76,7 @@ class UMLElementTypes { } def getBaseElementTypeSet() { - baseElementTypesSetConfiguration ?: ElementTypeSetConfigurationRegistry.getInstance.getElementTypeSetConfigurations().get(baseElementTypesSet) + baseElementTypesSetConfiguration ?: ElementTypeSetConfigurationRegistry.getInstance.getElementTypeSetConfigurations().get(contextId).get(baseElementTypesSet) } def getBaseElementTypes() { -- cgit v1.2.3