Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-14 12:05:53 -0500
committerCamille Letavernier2014-02-14 12:05:53 -0500
commit1d47e34956503af5e79ef615daa83afb9843349d (patch)
treec85817eee2e2a7b877ba506516fd89d2aff516d2
parentc0c83e3a6ccc602c1d6e061b4bda04957abf6279 (diff)
parentf6ad5afd37041f1cbb1bd82304d6f6a613a8de63 (diff)
downloadorg.eclipse.papyrus-1d47e34956503af5e79ef615daa83afb9843349d.tar.gz
org.eclipse.papyrus-1d47e34956503af5e79ef615daa83afb9843349d.tar.xz
org.eclipse.papyrus-1d47e34956503af5e79ef615daa83afb9843349d.zip
Synchronize with 0.10-maintenance / Kepler
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/MultiLineTextCellEditorEx.java3
-rw-r--r--extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java1
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragBorderNodeEditPartTrackerEx.java2
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragEditPartsTrackerEx.java114
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties8
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore13
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag107
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel19
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag4
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml25
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java42
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java51
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java265
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java52
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java106
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java152
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java228
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java158
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java196
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java41
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java28
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java183
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java50
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java27
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java30
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java54
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java11
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java2
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java71
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java29
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java36
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java138
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java32
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java64
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml9
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java110
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java125
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java178
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java3
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java22
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java5
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java3
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF1
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java18
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java40
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java49
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java18
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java40
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java23
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java38
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java33
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java17
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF4
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java466
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java676
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java30
-rw-r--r--plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java433
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderNodeEditPart.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/.project2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF25
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/plugin.xml3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ChildConfigurationItemProvider.java)9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java)11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java)10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java)10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java)10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java)9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java)14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java)10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java)8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java)9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java)10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java)33
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.classpath7
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/META-INF/MANIFEST.MF19
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/build.properties10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/obj16/PaletteconfigurationModelFile.gifbin0 -> 633 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/wizban/NewPaletteconfiguration.gifbin0 -> 2462 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.properties53
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.xml37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java94
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationActionBarContributor.java423
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationEditor.java1821
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationModelWizard.java628
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag37
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java12
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF18
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag4
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore11
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag54
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel19
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml10
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java32
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java27
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java13
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java54
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java69
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java52
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java226
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java105
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java195
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java209
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java188
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java172
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java2
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java29
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java38
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java121
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java57
-rw-r--r--releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly-tests/build.rmap14
-rw-r--r--releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly/build.rmap14
-rw-r--r--releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly-tests/build.rmap12
-rw-r--r--releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly/build.rmap12
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx38
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes10
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml9
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt2
-rw-r--r--tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java1496
133 files changed, 9290 insertions, 2117 deletions
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/MultiLineTextCellEditorEx.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/MultiLineTextCellEditorEx.java
index 125a68e0082..2d84c1fac7e 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/MultiLineTextCellEditorEx.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/celleditor/MultiLineTextCellEditorEx.java
@@ -13,7 +13,10 @@
package org.eclipse.papyrus.infra.nattable.celleditor;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
diff --git a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
index 3e08b875465..96d79c25702 100644
--- a/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
+++ b/extraplugins/table/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/manager/axis/CompositeAxisManager.java
@@ -171,6 +171,7 @@ public class CompositeAxisManager extends AbstractAxisManager implements ICompos
*/
@Override
public void dispose() {
+ super.dispose();
for(final IAxisManager current : this.subManagers) {
current.dispose();
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragBorderNodeEditPartTrackerEx.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragBorderNodeEditPartTrackerEx.java
index 496e2de73dc..07b976595bc 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragBorderNodeEditPartTrackerEx.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragBorderNodeEditPartTrackerEx.java
@@ -29,7 +29,7 @@ public class PapyrusDragBorderNodeEditPartTrackerEx extends PapyrusDragEditParts
* @param sourceEditPart
*/
public PapyrusDragBorderNodeEditPartTrackerEx(EditPart sourceEditPart) {
- this(sourceEditPart, false, true, true);
+ this(sourceEditPart, false, false, true);
}
/**
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragEditPartsTrackerEx.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragEditPartsTrackerEx.java
index 932f42f57d8..e184e3ee46c 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragEditPartsTrackerEx.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/snap/PapyrusDragEditPartsTrackerEx.java
@@ -21,7 +21,10 @@ import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PrecisionPoint;
import org.eclipse.draw2d.geometry.PrecisionRectangle;
import org.eclipse.gef.EditPart;
+import org.eclipse.gef.RootEditPart;
import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.internal.ruler.SnapToHelperUtil;
import org.eclipse.papyrus.infra.gmfdiag.common.snap.copy.DragEditPartsTrackerEx;
@@ -85,7 +88,13 @@ public class PapyrusDragEditPartsTrackerEx extends DragEditPartsTrackerEx {
*/
@SuppressWarnings({ "unchecked" })
protected void snapPoint(ChangeBoundsRequest request) {
- if(getSnapToHelper() != null && request.isSnapToEnabled()) {
+ if(getSnapToHelper() != null && request.isSnapToEnabled() && request.getEditParts().size() > 0) {
+
+ //test to know if we are moving using keyboard
+ if(!getCurrentInput().isAnyButtonDown()) {
+ calculateSnapPointFromArrowKey(request);
+ return;
+ }
int restrictedDirection = 0;
restrictedDirection = restrictedDirection | PositionConstants.EAST;
restrictedDirection = restrictedDirection | PositionConstants.WEST;
@@ -120,6 +129,109 @@ public class PapyrusDragEditPartsTrackerEx extends DragEditPartsTrackerEx {
/**
*
* @param request
+ * a move request
+ * @return
+ * the restricted direction for the request
+ */
+ protected final int getRestrictedDirection(final ChangeBoundsRequest request) {
+ int restrictedDirection = 0;
+ final Point delta = request.getMoveDelta();
+ if(delta.x > 0) {
+ restrictedDirection = restrictedDirection | PositionConstants.EAST;
+ restrictedDirection = restrictedDirection | PositionConstants.WEST;
+ }
+ if(delta.x < 0) {
+ restrictedDirection = restrictedDirection | PositionConstants.EAST;
+ restrictedDirection = restrictedDirection | PositionConstants.WEST;
+ }
+ if(delta.y > 0) {
+ restrictedDirection = restrictedDirection | PositionConstants.SOUTH;
+ restrictedDirection = restrictedDirection | PositionConstants.NORTH;
+ }
+ if(delta.y < 0) {
+ restrictedDirection = restrictedDirection | PositionConstants.SOUTH;
+ restrictedDirection = restrictedDirection | PositionConstants.NORTH;
+ }
+ return restrictedDirection;
+ }
+
+ /**
+ *
+ * @param request
+ * the move request
+ */
+ @SuppressWarnings("unchecked")
+ protected void calculateSnapPointFromArrowKey(final ChangeBoundsRequest request) {
+ if(request.getEditParts().size() == 0) {
+ return;
+ }
+ final Object ep = request.getEditParts().get(0);
+ if(!(ep instanceof IGraphicalEditPart)) {
+ return;
+ }
+ final RootEditPart root = ((IGraphicalEditPart)ep).getRoot();
+ if(!(root instanceof DiagramRootEditPart)) {
+ return;
+ }
+ final double gridSpacing = ((DiagramRootEditPart)root).getGridSpacing();
+ int max = (int)(1 + gridSpacing);
+ int restrictedDirection = getRestrictedDirection(request);
+ final Point delta = request.getMoveDelta();
+ final Point newDelta = new Point(0, 0);
+ int newMove = 0;
+ while(newMove < max) {
+ newMove++;
+ if(delta.x > 0) {
+ newDelta.x = (int)newMove + delta.x;
+ }
+ if(delta.x < 0) {
+ newDelta.x = (-newMove) + delta.x;
+ }
+ if(delta.y > 0) {
+ newDelta.y = newMove + delta.y;
+ }
+ if(delta.y < 0) {
+ newDelta.y = (-newMove) + delta.y;
+ }
+ request.setMoveDelta(newDelta);
+ request.getExtendedData().put(SnapToHelperUtil.RESTRICTED_DIRECTIONS, restrictedDirection);
+
+ final Map<Double, PrecisionPoint> distVSPoint = new HashMap<Double, PrecisionPoint>();
+ if(this.snapOnCorners) {
+ distVSPoint.putAll(getCornerDistances(request));
+ }
+
+ if(this.snapOnMiddles) {
+ distVSPoint.putAll(getMiddleDistances(request));
+ }
+
+ if(this.snapOnCenter) {
+ distVSPoint.putAll(getCenterDistances(request));
+ }
+
+ final List<Double> distances = new ArrayList<Double>(distVSPoint.keySet());
+ if(distances.size() > 0) {
+ double min = distances.get(0);
+ //We look for the minus distance
+ for(int i = 1; i < distances.size() - 1; i++) {
+ min = Math.min(min, distances.get(i));
+ }
+ final Point minPoint = distVSPoint.get(min);
+ //the distance can't be null
+ if(minPoint.x != 0 || minPoint.y != 0) {
+ //the calculate move must be in the same direction than the keyboard move
+ if(Integer.signum(minPoint.x) == Integer.signum(delta.x) && Integer.signum(minPoint.y) == Integer.signum(delta.y)) {
+ request.setMoveDelta(distVSPoint.get(min));
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @param request
* @return
* a map with the couple distance and delta point to anchor by the corner of the figure
*/
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs
index 0c0738865ea..8c78ef012bb 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,4 @@
eclipse.preferences.version=1
+encoding//model/RuntimeValuesEditionActionConfiguration.ecorediag=UTF-8
encoding//model/SetValuesActionConfiguration.ecore=UTF-8
encoding//model/SetValuesActionConfiguration.ecorediag=UTF-8
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF
index af7ee164123..fa921b00e38 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/META-INF/MANIFEST.MF
@@ -1,6 +1,9 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.extendedtypes.emf,
org.eclipse.papyrus.infra.extendedtypes.emf.converter,
+ org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration,
+ org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl,
+ org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util,
org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration,
org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl,
org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util
@@ -19,7 +22,11 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.2",
org.eclipse.gmf.runtime.common.core;bundle-version="1.4.1",
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
- org.eclipse.core.databinding;bundle-version="1.4.1"
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.2",
+ org.eclipse.papyrus.views.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.views.properties.model;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.constraints;bundle-version="0.10.2"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties
index c6a789a1ea7..41808c4d7e5 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/build.properties
@@ -1,7 +1,13 @@
#
#Mon Sep 12 09:29:52 CEST 2011
output..=bin/
-bin.includes=.,model/,META-INF/,plugin.xml,plugin.properties,about.html
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ icons/
jars.compile.order=.
src.includes = about.html
source.. = src/,\
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore
new file mode 100644
index 00000000000..edba70d746e
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecore
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="runtimevalueseditionactionconfiguration" nsURI="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0"
+ nsPrefix="runtimevalueseditionactionconfiguration">
+ <eClassifiers xsi:type="ecore:EClass" name="RuntimeValuesEditionActionConfiguration"
+ eSuperTypes="../../org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="viewsToDisplay" upperBound="-1"
+ eType="#//ViewToDisplay" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ViewToDisplay">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="view" lowerBound="1" eType="ecore:EClass ../../org.eclipse.papyrus.views.properties.model/Model/Properties.ecore#//contexts/View"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag
new file mode 100644
index 00000000000..6ae63cd48d3
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.ecorediag
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_6iPDYJM8EeOW09nMQ1MuzQ" type="EcoreTools" name="RuntimeValuesEditionActionConfiguration.ecorediag" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_6igJIJM8EeOW09nMQ1MuzQ" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_6ilBoJM8EeOW09nMQ1MuzQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_6ilosJM8EeOW09nMQ1MuzQ" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_6ilosZM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6ilospM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6ilos5M8EeOW09nMQ1MuzQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_6imPwJM8EeOW09nMQ1MuzQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_6imPwZM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6imPwpM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6imPw5M8EeOW09nMQ1MuzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_6igJIZM8EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="RuntimeValuesEditionActionConfiguration.ecore#//RuntimeValuesEditionActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6igJIpM8EeOW09nMQ1MuzQ" x="130" y="200" height="148"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_6iqhMJM8EeOW09nMQ1MuzQ" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_6irIQJM8EeOW09nMQ1MuzQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_6irIQZM8EeOW09nMQ1MuzQ" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_6irIQpM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6irIQ5M8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6irIRJM8EeOW09nMQ1MuzQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_6irIRZM8EeOW09nMQ1MuzQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_6irIRpM8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_6irIR5M8EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_6irISJM8EeOW09nMQ1MuzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_6iqhMZM8EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="RuntimeValuesEditionActionConfiguration.ecore#//ViewToDisplay"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6iqhMpM8EeOW09nMQ1MuzQ" x="570" y="200" width="138" height="148"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_A7S3MJM9EeOW09nMQ1MuzQ" type="1001">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_A7rRsJM9EeOW09nMQ1MuzQ" source="Shortcut">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_A7rRsZM9EeOW09nMQ1MuzQ" key="modelID" value="EcoreTools"/>
+ </eAnnotations>
+ <children xmi:type="notation:Node" xmi:id="_A7TeQJM9EeOW09nMQ1MuzQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_A7UFUJM9EeOW09nMQ1MuzQ" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_A7UFUZM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_A7UFUpM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_A7UFU5M9EeOW09nMQ1MuzQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_A7UFVJM9EeOW09nMQ1MuzQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_A7UFVZM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_A7UFVpM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_A7UFV5M9EeOW09nMQ1MuzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_A7S3MZM9EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12560536" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_A7S3MpM9EeOW09nMQ1MuzQ" x="145" y="60" width="228"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_OAiPIJM9EeOW09nMQ1MuzQ" type="1001">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_OBIsEJM9EeOW09nMQ1MuzQ" source="Shortcut">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_OBIsEZM9EeOW09nMQ1MuzQ" key="modelID" value="EcoreTools"/>
+ </eAnnotations>
+ <children xmi:type="notation:Node" xmi:id="_OAkEUJM9EeOW09nMQ1MuzQ" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_OAkrYJM9EeOW09nMQ1MuzQ" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_OAkrYZM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OAkrYpM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OAkrY5M9EeOW09nMQ1MuzQ"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_OAlScJM9EeOW09nMQ1MuzQ" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_OAlScZM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OAlScpM9EeOW09nMQ1MuzQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OAlSc5M9EeOW09nMQ1MuzQ"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_OAi2MJM9EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12560536" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.papyrus.views.properties.model/Model/Properties.ecore#//contexts/View"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OAi2MZM9EeOW09nMQ1MuzQ" x="860" y="225"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_6iPqcJM8EeOW09nMQ1MuzQ"/>
+ <element xmi:type="ecore:EPackage" href="RuntimeValuesEditionActionConfiguration.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_6i0SMJM8EeOW09nMQ1MuzQ" type="3002" source="_6igJIJM8EeOW09nMQ1MuzQ" target="_6iqhMJM8EeOW09nMQ1MuzQ">
+ <children xmi:type="notation:Node" xmi:id="_6i2HYJM8EeOW09nMQ1MuzQ" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_6i2HYZM8EeOW09nMQ1MuzQ" x="-24" y="-12"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_6i2ucJM8EeOW09nMQ1MuzQ" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_6i2ucZM8EeOW09nMQ1MuzQ" x="10" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_6i0SMZM8EeOW09nMQ1MuzQ" routing="Rectilinear" closestDistance="true" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_6i0SMpM8EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="RuntimeValuesEditionActionConfiguration.ecore#//RuntimeValuesEditionActionConfiguration/viewsToDisplay"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6i0SM5M8EeOW09nMQ1MuzQ" points="[9, -25, -198, -27]$[189, -25, -18, -27]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6koQEJM8EeOW09nMQ1MuzQ" id="(0.9656488549618321,0.5878378378378378)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6koQEZM8EeOW09nMQ1MuzQ" id="(0.1792452830188679,0.6013513513513513)"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_A7dPQJM9EeOW09nMQ1MuzQ" type="3003" source="_6igJIJM8EeOW09nMQ1MuzQ" target="_A7S3MJM9EeOW09nMQ1MuzQ">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_A7dPQZM9EeOW09nMQ1MuzQ" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_A7dPQpM9EeOW09nMQ1MuzQ" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_A7dPQ5M9EeOW09nMQ1MuzQ" points="[0, -73, -3, 111]$[0, -155, -3, 29]"/>
+ </edges>
+ <edges xmi:type="notation:Edge" xmi:id="_OBBXUJM9EeOW09nMQ1MuzQ" type="3002" source="_6iqhMJM8EeOW09nMQ1MuzQ" target="_OAiPIJM9EeOW09nMQ1MuzQ">
+ <children xmi:type="notation:Node" xmi:id="_OBB-YJM9EeOW09nMQ1MuzQ" type="4011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_OBB-YZM9EeOW09nMQ1MuzQ" x="-10" y="-10"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_OBB-YpM9EeOW09nMQ1MuzQ" type="4012">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_OBB-Y5M9EeOW09nMQ1MuzQ" x="10" y="10"/>
+ </children>
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_OBBXUZM9EeOW09nMQ1MuzQ" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_OBBXUpM9EeOW09nMQ1MuzQ" fontColor="4210752" fontName="Segoe UI" fontHeight="10"/>
+ <element xmi:type="ecore:EReference" href="RuntimeValuesEditionActionConfiguration.ecore#//ViewToDisplay/view"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OBBXU5M9EeOW09nMQ1MuzQ" points="[-68, -30, 571, 244]$[-638, -274, 1, 0]"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel
new file mode 100644
index 00000000000..e154c2dd670
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/RuntimeValuesEditionActionConfiguration.genmodel
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen"
+ editDirectory="/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen" editorDirectory="/org.eclipse.papyrus.infra.extendedtypes.emf.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.infra.extendedtypes.emf" modelName="RuntimeValuesEditionActionConfiguration"
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="platform:/plugin/org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel#//extendedtypes platform:/plugin/org.eclipse.papyrus.views.properties.model/Model/Properties.genmodel#//properties"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>RuntimeValuesEditionActionConfiguration.ecore</foreignModel>
+ <genPackages prefix="RuntimeValuesEditionActionConfiguration" disposableProviderFactory="true" resource="XML" basePackage="org.eclipse.papyrus.infra.extendedtypes.emf"
+ ecorePackage="RuntimeValuesEditionActionConfiguration.ecore#/">
+ <genClasses ecoreClass="RuntimeValuesEditionActionConfiguration.ecore#//RuntimeValuesEditionActionConfiguration">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference RuntimeValuesEditionActionConfiguration.ecore#//RuntimeValuesEditionActionConfiguration/viewsToDisplay"/>
+ </genClasses>
+ <genClasses ecoreClass="RuntimeValuesEditionActionConfiguration.ecore#//ViewToDisplay">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference RuntimeValuesEditionActionConfiguration.ecore#//ViewToDisplay/view"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore
index 31151b3d79f..5c42dea3afe 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecore
@@ -11,7 +11,6 @@
eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1" eType="#//FeatureValue"
containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="atRuntime" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FeatureValue" abstract="true"/>
<eClassifiers xsi:type="ecore:EClass" name="DynamicValue" abstract="true" eSuperTypes="#//FeatureValue"/>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag
index be9dde79cd8..9c51a194c39 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.ecorediag
@@ -23,10 +23,6 @@
<element xmi:type="ecore:EAttribute" href="SetValuesActionConfiguration.ecore#//FeatureToSet/featureName"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_rSjOgVVnEeCZTbk4eXVjvg"/>
</children>
- <children xmi:type="notation:Node" xmi:id="_lo-IgIK0EeOjkMhtoir5vQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="SetValuesActionConfiguration.ecore#//FeatureToSet/atRuntime"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_lo-IgYK0EeOjkMhtoir5vQ"/>
- </children>
<styles xmi:type="notation:DrawerStyle" xmi:id="_m7ThclVnEeCZTbk4eXVjvg"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_m7Thc1VnEeCZTbk4eXVjvg"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_m7ThdFVnEeCZTbk4eXVjvg"/>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel
index 317df670830..a8786580aa0 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/model/SetValuesActionConfiguration.genmodel
@@ -15,7 +15,6 @@
<genClasses ecoreClass="SetValuesActionConfiguration.ecore#//FeatureToSet">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetValuesActionConfiguration.ecore#//FeatureToSet/featureName"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SetValuesActionConfiguration.ecore#//FeatureToSet/value"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetValuesActionConfiguration.ecore#//FeatureToSet/atRuntime"/>
</genClasses>
<genClasses image="false" ecoreClass="SetValuesActionConfiguration.ecore#//FeatureValue"/>
<genClasses ecoreClass="SetValuesActionConfiguration.ecore#//DynamicValue"/>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml
index 49575ac4334..afdf6d9e6df 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/plugin.xml
@@ -19,6 +19,21 @@
</extension>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated RuntimeValuesEditionActionConfiguration -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0"
+ class="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage"
+ genModel="model/RuntimeValuesEditionActionConfiguration.genmodel"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.extension_parser">
+ <!-- @generated RuntimeValuesEditionActionConfiguration -->
+ <parser
+ type="runtimevalueseditionactionconfiguration"
+ class="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceFactoryImpl"/>
+ </extension>
+
<extension
point="org.eclipse.papyrus.infra.extendedtypes.aspectActionConfiguration">
<aspectAction
@@ -28,4 +43,14 @@
editHelperAdvice="org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionEditHelperAdvice">
</aspectAction>
</extension>
+
+ <extension
+ point="org.eclipse.papyrus.infra.extendedtypes.aspectActionConfiguration">
+ <aspectAction
+ configurationClass="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration"
+ configurationModelCreation="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationModelCreation"
+ creationElementValidator="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionCreationElementValidator"
+ editHelperAdvice="org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionEditHelperAdvice">
+ </aspectAction>
+ </extension>
</plugin>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java
new file mode 100644
index 00000000000..37ebf59c221
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Runtime Values Edition Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay <em>Views To Display</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getRuntimeValuesEditionActionConfiguration()
+ * @model
+ * @generated
+ */
+public interface RuntimeValuesEditionActionConfiguration extends SemanticActionConfiguration {
+ /**
+ * Returns the value of the '<em><b>Views To Display</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Views To Display</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Views To Display</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getRuntimeValuesEditionActionConfiguration_ViewsToDisplay()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ViewToDisplay> getViewsToDisplay();
+
+} // RuntimeValuesEditionActionConfiguration
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java
new file mode 100644
index 00000000000..274c916db74
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationFactory.java
@@ -0,0 +1,51 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage
+ * @generated
+ */
+public interface RuntimeValuesEditionActionConfigurationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ RuntimeValuesEditionActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Runtime Values Edition Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Runtime Values Edition Action Configuration</em>'.
+ * @generated
+ */
+ RuntimeValuesEditionActionConfiguration createRuntimeValuesEditionActionConfiguration();
+
+ /**
+ * Returns a new object of class '<em>View To Display</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>View To Display</em>'.
+ * @generated
+ */
+ ViewToDisplay createViewToDisplay();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ RuntimeValuesEditionActionConfigurationPackage getRuntimeValuesEditionActionConfigurationPackage();
+
+} //RuntimeValuesEditionActionConfigurationFactory
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java
new file mode 100644
index 00000000000..e363f20c8f7
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationPackage.java
@@ -0,0 +1,265 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface RuntimeValuesEditionActionConfigurationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "runtimevalueseditionactionconfiguration";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "runtimevalueseditionactionconfiguration";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ RuntimeValuesEditionActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl <em>Runtime Values Edition Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getRuntimeValuesEditionActionConfiguration()
+ * @generated
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Identifier</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER;
+
+ /**
+ * The feature id for the '<em><b>Icon Entry</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY;
+
+ /**
+ * The feature id for the '<em><b>Views To Display</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Runtime Values Edition Action Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl <em>View To Display</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getViewToDisplay()
+ * @generated
+ */
+ int VIEW_TO_DISPLAY = 1;
+
+ /**
+ * The feature id for the '<em><b>View</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEW_TO_DISPLAY__VIEW = 0;
+
+ /**
+ * The number of structural features of the '<em>View To Display</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEW_TO_DISPLAY_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>View To Display</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VIEW_TO_DISPLAY_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration <em>Runtime Values Edition Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Runtime Values Edition Action Configuration</em>'.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration
+ * @generated
+ */
+ EClass getRuntimeValuesEditionActionConfiguration();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay <em>Views To Display</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Views To Display</em>'.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration#getViewsToDisplay()
+ * @see #getRuntimeValuesEditionActionConfiguration()
+ * @generated
+ */
+ EReference getRuntimeValuesEditionActionConfiguration_ViewsToDisplay();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay <em>View To Display</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>View To Display</em>'.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay
+ * @generated
+ */
+ EClass getViewToDisplay();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView <em>View</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>View</em>'.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView()
+ * @see #getViewToDisplay()
+ * @generated
+ */
+ EReference getViewToDisplay_View();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ RuntimeValuesEditionActionConfigurationFactory getRuntimeValuesEditionActionConfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl <em>Runtime Values Edition Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getRuntimeValuesEditionActionConfiguration()
+ * @generated
+ */
+ EClass RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION = eINSTANCE.getRuntimeValuesEditionActionConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Views To Display</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY = eINSTANCE.getRuntimeValuesEditionActionConfiguration_ViewsToDisplay();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl <em>View To Display</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationPackageImpl#getViewToDisplay()
+ * @generated
+ */
+ EClass VIEW_TO_DISPLAY = eINSTANCE.getViewToDisplay();
+
+ /**
+ * The meta object literal for the '<em><b>View</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference VIEW_TO_DISPLAY__VIEW = eINSTANCE.getViewToDisplay_View();
+
+ }
+
+} //RuntimeValuesEditionActionConfigurationPackage
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java
new file mode 100644
index 00000000000..55daa423e7b
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/ViewToDisplay.java
@@ -0,0 +1,52 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.views.properties.contexts.View;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>View To Display</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView <em>View</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getViewToDisplay()
+ * @model
+ * @generated
+ */
+public interface ViewToDisplay extends EObject {
+ /**
+ * Returns the value of the '<em><b>View</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>View</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>View</em>' reference.
+ * @see #setView(View)
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#getViewToDisplay_View()
+ * @model required="true"
+ * @generated
+ */
+ View getView();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay#getView <em>View</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>View</em>' reference.
+ * @see #getView()
+ * @generated
+ */
+ void setView(View value);
+
+} // ViewToDisplay
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java
new file mode 100644
index 00000000000..61dfd3cfee4
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationFactoryImpl.java
@@ -0,0 +1,106 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationFactoryImpl extends EFactoryImpl implements RuntimeValuesEditionActionConfigurationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static RuntimeValuesEditionActionConfigurationFactory init() {
+ try {
+ RuntimeValuesEditionActionConfigurationFactory theRuntimeValuesEditionActionConfigurationFactory = (RuntimeValuesEditionActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(RuntimeValuesEditionActionConfigurationPackage.eNS_URI);
+ if (theRuntimeValuesEditionActionConfigurationFactory != null) {
+ return theRuntimeValuesEditionActionConfigurationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new RuntimeValuesEditionActionConfigurationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION: return createRuntimeValuesEditionActionConfiguration();
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY: return createViewToDisplay();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfiguration createRuntimeValuesEditionActionConfiguration() {
+ RuntimeValuesEditionActionConfigurationImpl runtimeValuesEditionActionConfiguration = new RuntimeValuesEditionActionConfigurationImpl();
+ return runtimeValuesEditionActionConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ViewToDisplay createViewToDisplay() {
+ ViewToDisplayImpl viewToDisplay = new ViewToDisplayImpl();
+ return viewToDisplay;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationPackage getRuntimeValuesEditionActionConfigurationPackage() {
+ return (RuntimeValuesEditionActionConfigurationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static RuntimeValuesEditionActionConfigurationPackage getPackage() {
+ return RuntimeValuesEditionActionConfigurationPackage.eINSTANCE;
+ }
+
+} //RuntimeValuesEditionActionConfigurationFactoryImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java
new file mode 100644
index 00000000000..76a899fb04a
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationImpl.java
@@ -0,0 +1,152 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay;
+
+import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Runtime Values Edition Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.RuntimeValuesEditionActionConfigurationImpl#getViewsToDisplay <em>Views To Display</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationImpl extends SemanticActionConfigurationImpl implements RuntimeValuesEditionActionConfiguration {
+ /**
+ * The cached value of the '{@link #getViewsToDisplay() <em>Views To Display</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getViewsToDisplay()
+ * @generated
+ * @ordered
+ */
+ protected EList<ViewToDisplay> viewsToDisplay;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RuntimeValuesEditionActionConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RuntimeValuesEditionActionConfigurationPackage.Literals.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ViewToDisplay> getViewsToDisplay() {
+ if (viewsToDisplay == null) {
+ viewsToDisplay = new EObjectContainmentEList<ViewToDisplay>(ViewToDisplay.class, this, RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY);
+ }
+ return viewsToDisplay;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY:
+ return ((InternalEList<?>)getViewsToDisplay()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY:
+ return getViewsToDisplay();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY:
+ getViewsToDisplay().clear();
+ getViewsToDisplay().addAll((Collection<? extends ViewToDisplay>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY:
+ getViewsToDisplay().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY:
+ return viewsToDisplay != null && !viewsToDisplay.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //RuntimeValuesEditionActionConfigurationImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java
new file mode 100644
index 00000000000..745276f1ed8
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/RuntimeValuesEditionActionConfigurationPackageImpl.java
@@ -0,0 +1,228 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationFactory;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay;
+
+import org.eclipse.papyrus.views.properties.contexts.ContextsPackage;
+
+import org.eclipse.papyrus.views.properties.environment.EnvironmentPackage;
+
+import org.eclipse.papyrus.views.properties.ui.UiPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationPackageImpl extends EPackageImpl implements RuntimeValuesEditionActionConfigurationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass runtimeValuesEditionActionConfigurationEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass viewToDisplayEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private RuntimeValuesEditionActionConfigurationPackageImpl() {
+ super(eNS_URI, RuntimeValuesEditionActionConfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link RuntimeValuesEditionActionConfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static RuntimeValuesEditionActionConfigurationPackage init() {
+ if (isInited) return (RuntimeValuesEditionActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(RuntimeValuesEditionActionConfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ RuntimeValuesEditionActionConfigurationPackageImpl theRuntimeValuesEditionActionConfigurationPackage = (RuntimeValuesEditionActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof RuntimeValuesEditionActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new RuntimeValuesEditionActionConfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ExtendedtypesPackage.eINSTANCE.eClass();
+ EnvironmentPackage.eINSTANCE.eClass();
+ ContextsPackage.eINSTANCE.eClass();
+ UiPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theRuntimeValuesEditionActionConfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theRuntimeValuesEditionActionConfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theRuntimeValuesEditionActionConfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(RuntimeValuesEditionActionConfigurationPackage.eNS_URI, theRuntimeValuesEditionActionConfigurationPackage);
+ return theRuntimeValuesEditionActionConfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRuntimeValuesEditionActionConfiguration() {
+ return runtimeValuesEditionActionConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRuntimeValuesEditionActionConfiguration_ViewsToDisplay() {
+ return (EReference)runtimeValuesEditionActionConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getViewToDisplay() {
+ return viewToDisplayEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getViewToDisplay_View() {
+ return (EReference)viewToDisplayEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationFactory getRuntimeValuesEditionActionConfigurationFactory() {
+ return (RuntimeValuesEditionActionConfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ runtimeValuesEditionActionConfigurationEClass = createEClass(RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION);
+ createEReference(runtimeValuesEditionActionConfigurationEClass, RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION__VIEWS_TO_DISPLAY);
+
+ viewToDisplayEClass = createEClass(VIEW_TO_DISPLAY);
+ createEReference(viewToDisplayEClass, VIEW_TO_DISPLAY__VIEW);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI);
+ ContextsPackage theContextsPackage = (ContextsPackage)EPackage.Registry.INSTANCE.getEPackage(ContextsPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ runtimeValuesEditionActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(runtimeValuesEditionActionConfigurationEClass, RuntimeValuesEditionActionConfiguration.class, "RuntimeValuesEditionActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRuntimeValuesEditionActionConfiguration_ViewsToDisplay(), this.getViewToDisplay(), null, "viewsToDisplay", null, 0, -1, RuntimeValuesEditionActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(viewToDisplayEClass, ViewToDisplay.class, "ViewToDisplay", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getViewToDisplay_View(), theContextsPackage.getView(), null, "view", null, 1, 1, ViewToDisplay.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //RuntimeValuesEditionActionConfigurationPackageImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java
new file mode 100644
index 00000000000..6c4a1e2686b
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/impl/ViewToDisplayImpl.java
@@ -0,0 +1,158 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage;
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay;
+
+import org.eclipse.papyrus.views.properties.contexts.View;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>View To Display</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.impl.ViewToDisplayImpl#getView <em>View</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ViewToDisplayImpl extends MinimalEObjectImpl.Container implements ViewToDisplay {
+ /**
+ * The cached value of the '{@link #getView() <em>View</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getView()
+ * @generated
+ * @ordered
+ */
+ protected View view;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewToDisplayImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return RuntimeValuesEditionActionConfigurationPackage.Literals.VIEW_TO_DISPLAY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public View getView() {
+ if (view != null && view.eIsProxy()) {
+ InternalEObject oldView = (InternalEObject)view;
+ view = (View)eResolveProxy(oldView);
+ if (view != oldView) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW, oldView, view));
+ }
+ }
+ return view;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public View basicGetView() {
+ return view;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setView(View newView) {
+ View oldView = view;
+ view = newView;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW, oldView, view));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW:
+ if (resolve) return getView();
+ return basicGetView();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW:
+ setView((View)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW:
+ setView((View)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY__VIEW:
+ return view != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ViewToDisplayImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java
new file mode 100644
index 00000000000..bb153d91131
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationAdapterFactory.java
@@ -0,0 +1,196 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RuntimeValuesEditionActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = RuntimeValuesEditionActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RuntimeValuesEditionActionConfigurationSwitch<Adapter> modelSwitch =
+ new RuntimeValuesEditionActionConfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter caseRuntimeValuesEditionActionConfiguration(RuntimeValuesEditionActionConfiguration object) {
+ return createRuntimeValuesEditionActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseViewToDisplay(ViewToDisplay object) {
+ return createViewToDisplayAdapter();
+ }
+ @Override
+ public Adapter caseConfigurationElement(ConfigurationElement object) {
+ return createConfigurationElementAdapter();
+ }
+ @Override
+ public Adapter caseActionConfiguration(ActionConfiguration object) {
+ return createActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return createSemanticActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration <em>Runtime Values Edition Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfiguration
+ * @generated
+ */
+ public Adapter createRuntimeValuesEditionActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay <em>View To Display</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.ViewToDisplay
+ * @generated
+ */
+ public Adapter createViewToDisplayAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement <em>Configuration Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement
+ * @generated
+ */
+ public Adapter createConfigurationElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration <em>Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration
+ * @generated
+ */
+ public Adapter createActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration <em>Semantic Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration
+ * @generated
+ */
+ public Adapter createSemanticActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //RuntimeValuesEditionActionConfigurationAdapterFactory
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java
new file mode 100644
index 00000000000..39ee50b765d
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceFactoryImpl.java
@@ -0,0 +1,41 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceImpl
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new RuntimeValuesEditionActionConfigurationResourceImpl(uri);
+ return result;
+ }
+
+} //RuntimeValuesEditionActionConfigurationResourceFactoryImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java
new file mode 100644
index 00000000000..49df6d9c773
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationResourceImpl.java
@@ -0,0 +1,28 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util.RuntimeValuesEditionActionConfigurationResourceFactoryImpl
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //RuntimeValuesEditionActionConfigurationResourceImpl
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java
new file mode 100644
index 00000000000..ff18e23310b
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationSwitch.java
@@ -0,0 +1,183 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static RuntimeValuesEditionActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = RuntimeValuesEditionActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case RuntimeValuesEditionActionConfigurationPackage.RUNTIME_VALUES_EDITION_ACTION_CONFIGURATION: {
+ RuntimeValuesEditionActionConfiguration runtimeValuesEditionActionConfiguration = (RuntimeValuesEditionActionConfiguration)theEObject;
+ T result = caseRuntimeValuesEditionActionConfiguration(runtimeValuesEditionActionConfiguration);
+ if (result == null) result = caseSemanticActionConfiguration(runtimeValuesEditionActionConfiguration);
+ if (result == null) result = caseActionConfiguration(runtimeValuesEditionActionConfiguration);
+ if (result == null) result = caseConfigurationElement(runtimeValuesEditionActionConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case RuntimeValuesEditionActionConfigurationPackage.VIEW_TO_DISPLAY: {
+ ViewToDisplay viewToDisplay = (ViewToDisplay)theEObject;
+ T result = caseViewToDisplay(viewToDisplay);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Runtime Values Edition Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Runtime Values Edition Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRuntimeValuesEditionActionConfiguration(RuntimeValuesEditionActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>View To Display</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>View To Display</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseViewToDisplay(ViewToDisplay object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConfigurationElement(ConfigurationElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActionConfiguration(ActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //RuntimeValuesEditionActionConfigurationSwitch
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java
new file mode 100644
index 00000000000..56b197b16bb
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/util/RuntimeValuesEditionActionConfigurationXMLProcessor.java
@@ -0,0 +1,50 @@
+/**
+ */
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+
+import org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration.RuntimeValuesEditionActionConfigurationPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class RuntimeValuesEditionActionConfigurationXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public RuntimeValuesEditionActionConfigurationXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ RuntimeValuesEditionActionConfigurationPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the RuntimeValuesEditionActionConfigurationResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new RuntimeValuesEditionActionConfigurationResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new RuntimeValuesEditionActionConfigurationResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //RuntimeValuesEditionActionConfigurationXMLProcessor
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java
index d3d9f81a345..4256ca2f085 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureToSet.java
@@ -14,7 +14,6 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getFeatureName <em>Feature Name</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}</li>
* </ul>
* </p>
*
@@ -75,30 +74,4 @@ public interface FeatureToSet extends EObject {
*/
void setValue(FeatureValue value);
- /**
- * Returns the value of the '<em><b>At Runtime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>At Runtime</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>At Runtime</em>' attribute.
- * @see #setAtRuntime(boolean)
- * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfigurationPackage#getFeatureToSet_AtRuntime()
- * @model
- * @generated
- */
- boolean isAtRuntime();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>At Runtime</em>' attribute.
- * @see #isAtRuntime()
- * @generated
- */
- void setAtRuntime(boolean value);
-
} // FeatureToSet
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java
index 57431abbe9a..e00b481a62c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionConfigurationPackage.java
@@ -150,22 +150,13 @@ public interface SetValuesActionConfigurationPackage extends EPackage {
int FEATURE_TO_SET__VALUE = 1;
/**
- * The feature id for the '<em><b>At Runtime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_TO_SET__AT_RUNTIME = 2;
-
- /**
* The number of structural features of the '<em>Feature To Set</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int FEATURE_TO_SET_FEATURE_COUNT = 3;
+ int FEATURE_TO_SET_FEATURE_COUNT = 2;
/**
* The meta object id for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl <em>Feature Value</em>}' class.
@@ -335,17 +326,6 @@ public interface SetValuesActionConfigurationPackage extends EPackage {
EReference getFeatureToSet_Value();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>At Runtime</em>'.
- * @see org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureToSet#isAtRuntime()
- * @see #getFeatureToSet()
- * @generated
- */
- EAttribute getFeatureToSet_AtRuntime();
-
- /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.FeatureValue <em>Feature Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -484,14 +464,6 @@ public interface SetValuesActionConfigurationPackage extends EPackage {
EReference FEATURE_TO_SET__VALUE = eINSTANCE.getFeatureToSet_Value();
/**
- * The meta object literal for the '<em><b>At Runtime</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute FEATURE_TO_SET__AT_RUNTIME = eINSTANCE.getFeatureToSet_AtRuntime();
-
- /**
* The meta object literal for the '{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureValueImpl <em>Feature Value</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java
index 4a24719170e..3d8730ef73c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/FeatureToSetImpl.java
@@ -24,7 +24,6 @@ import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.
* <ul>
* <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl#getFeatureName <em>Feature Name</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl#getValue <em>Value</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.impl.FeatureToSetImpl#isAtRuntime <em>At Runtime</em>}</li>
* </ul>
* </p>
*
@@ -62,26 +61,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
protected FeatureValue value;
/**
- * The default value of the '{@link #isAtRuntime() <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAtRuntime()
- * @generated
- * @ordered
- */
- protected static final boolean AT_RUNTIME_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isAtRuntime() <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAtRuntime()
- * @generated
- * @ordered
- */
- protected boolean atRuntime = AT_RUNTIME_EDEFAULT;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -169,27 +148,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
* <!-- end-user-doc -->
* @generated
*/
- public boolean isAtRuntime() {
- return atRuntime;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAtRuntime(boolean newAtRuntime) {
- boolean oldAtRuntime = atRuntime;
- atRuntime = newAtRuntime;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, SetValuesActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME, oldAtRuntime, atRuntime));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -211,8 +169,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
return getFeatureName();
case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE:
return getValue();
- case SetValuesActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- return isAtRuntime();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -231,9 +187,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE:
setValue((FeatureValue)newValue);
return;
- case SetValuesActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- setAtRuntime((Boolean)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -252,9 +205,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE:
setValue((FeatureValue)null);
return;
- case SetValuesActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- setAtRuntime(AT_RUNTIME_EDEFAULT);
- return;
}
super.eUnset(featureID);
}
@@ -271,8 +221,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName);
case SetValuesActionConfigurationPackage.FEATURE_TO_SET__VALUE:
return value != null;
- case SetValuesActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- return atRuntime != AT_RUNTIME_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -289,8 +237,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
StringBuffer result = new StringBuffer(super.toString());
result.append(" (featureName: ");
result.append(featureName);
- result.append(", atRuntime: ");
- result.append(atRuntime);
result.append(')');
return result.toString();
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java
index 31e54cbc30f..9c1cfe5c701 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src-gen/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/impl/SetValuesActionConfigurationPackageImpl.java
@@ -195,15 +195,6 @@ public class SetValuesActionConfigurationPackageImpl extends EPackageImpl implem
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getFeatureToSet_AtRuntime() {
- return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getFeatureValue() {
return featureValueEClass;
}
@@ -296,7 +287,6 @@ public class SetValuesActionConfigurationPackageImpl extends EPackageImpl implem
featureToSetEClass = createEClass(FEATURE_TO_SET);
createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME);
createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE);
- createEAttribute(featureToSetEClass, FEATURE_TO_SET__AT_RUNTIME);
featureValueEClass = createEClass(FEATURE_VALUE);
@@ -357,7 +347,6 @@ public class SetValuesActionConfigurationPackageImpl extends EPackageImpl implem
initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFeatureToSet_FeatureName(), theEcorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getFeatureToSet_AtRuntime(), theEcorePackage.getEBoolean(), "atRuntime", null, 0, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java
index 00ed70a3d0d..d6e61859cad 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ConverterRegistry.java
@@ -15,6 +15,7 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.uml2.uml.Enumeration;
import org.eclipse.uml2.uml.ValueSpecification;
@@ -56,6 +57,7 @@ public class ConverterRegistry {
converterMaps.put(int.class, new ValueSpecificationToIntegerConverter());
converterMaps.put(boolean.class, new ValueSpecificationToBooleanConverter());
converterMaps.put(Enumeration.class, new ValueSpecificationToEnumerationConverter());
+ converterMaps.put(EEnum.class, new ValueSpecificationToEENumConverter());
}
/**
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java
new file mode 100644
index 00000000000..5e69b4d8e44
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/converter/ValueSpecificationToEENumConverter.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.converter;
+
+import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.ValueSpecification;
+import org.eclipse.uml2.uml.VisibilityKind;
+
+
+/**
+ * @author RS211865
+ */
+public class ValueSpecificationToEENumConverter extends Converter implements IConverter {
+
+ /**
+ * @param fromType
+ * @param toType
+ */
+ public ValueSpecificationToEENumConverter() {
+ super(ValueSpecification.class, EEnum.class);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object convert(Object fromObject) {
+ if(fromObject instanceof InstanceValue) {
+ InstanceSpecification instanceSpecification = ((InstanceValue)fromObject).getInstance();
+ if(instanceSpecification instanceof EnumerationLiteral) {
+
+ System.err.println(VisibilityKind.PRIVATE_LITERAL);
+ Class<?> eclass = ((EnumerationLiteral)instanceSpecification).getEnumeration().eClass().getInstanceClass();
+ System.err.println(eclass.getEnumConstants());
+ System.err.println(eclass);
+
+
+
+
+
+
+// final EEnumLiteral literal = eenum.getEEnumLiteral(umlLiteral.getName());
+// if(literal != null) {
+// return literal.getInstance();
+// }
+// return null;
+//
+ System.err.println(instanceSpecification);
+
+
+ //return ((EnumerationLiteral)instanceSpecification).;
+ }
+ }
+
+ return fromObject;
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java
new file mode 100644
index 00000000000..d709ce447ee
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionConfigurationModelCreation.java
@@ -0,0 +1,29 @@
+
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation;
+
+/**
+ * {@link IActionConfigurationModelCreation} for {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionConfigurationModelCreation implements IActionConfigurationModelCreation<RuntimeValuesEditionActionConfiguration> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public RuntimeValuesEditionActionConfiguration createConfigurationModel() {
+ return RuntimeValuesEditionActionConfigurationFactory.eINSTANCE.createRuntimeValuesEditionActionConfiguration();
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java
new file mode 100644
index 00000000000..6e0279917f3
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionCreationElementValidator.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator;
+import org.eclipse.papyrus.infra.extendedtypes.ICreationElementValidator;
+
+/**
+ * {@link ICreationElementValidator} for {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionCreationElementValidator implements IActionCreationElementValidator<RuntimeValuesEditionActionConfiguration> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canCreate(CreateElementRequest request) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(RuntimeValuesEditionActionConfiguration configuration) {
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java
new file mode 100644
index 00000000000..5a9b8495d47
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/runtimevalueseditionactionconfiguration/RuntimeValuesEditionActionEditHelperAdvice.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes.emf.runtimevalueseditionactionconfiguration;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice;
+import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.SetValuesActionConfiguration;
+import org.eclipse.papyrus.views.properties.contexts.View;
+import org.eclipse.papyrus.views.properties.creation.EditionDialog;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * advice for the {@link SetValuesActionConfiguration}
+ */
+public class RuntimeValuesEditionActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice<RuntimeValuesEditionActionConfiguration> {
+
+ /** list of views to display */
+ protected Set<View> viewsToDisplay;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(RuntimeValuesEditionActionConfiguration configuration) {
+ viewsToDisplay = new HashSet<View>();
+ for(ViewToDisplay display : configuration.getViewsToDisplay()) {
+ View view = display.getView();
+ if(view!=null) {
+ viewsToDisplay.add(view);
+ }
+ }
+ }
+
+ /**
+ * Default Constructor
+ */
+ public RuntimeValuesEditionActionEditHelperAdvice() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean approveRequest(IEditCommandRequest request) {
+ return super.approveRequest(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeCreateCommand(CreateElementRequest request) {
+ return super.getBeforeCreateCommand(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getAfterCreateCommand(CreateElementRequest request) {
+ return super.getAfterCreateCommand(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(ConfigureRequest request) {
+ return super.getBeforeConfigureCommand(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(final ConfigureRequest request) {
+ final EObject elementToConfigure = request.getElementToConfigure();
+ if(elementToConfigure==null) {
+ return null;
+ }
+
+ return new AbstractTransactionalCommand(request.getEditingDomain(), "Editing "+EMFCoreUtil.getName(elementToConfigure), Collections.singletonList(WorkspaceSynchronizer.getFile((elementToConfigure.eResource())))) {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Set<View> viewsToDisplay = getViewsToDisplay();
+ if(!viewsToDisplay.isEmpty()) {
+ EditionDialog dialog = new EditionDialog(Display.getCurrent().getActiveShell()) {
+
+ };
+ dialog.setTitle("Edit "+EMFCoreUtil.getName(elementToConfigure));
+ dialog.setViews(viewsToDisplay);
+ dialog.setInput(elementToConfigure);
+
+ dialog.open();
+ }
+
+ return CommandResult.newOKCommandResult(elementToConfigure);
+ }
+ };
+
+ }
+
+
+ /**
+ * @return the viewsToDisplay
+ */
+ public Set<View> getViewsToDisplay() {
+ return viewsToDisplay;
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java
index 6f8f38a11ca..d26a56ddcd4 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/FeatureValueUtils.java
@@ -15,12 +15,20 @@ package org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.papyrus.infra.extendedtypes.Activator;
import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterNotfoundException;
import org.eclipse.papyrus.infra.extendedtypes.emf.converter.ConverterRegistry;
import org.eclipse.papyrus.infra.extendedtypes.emf.setvaluesactionconfiguration.util.SetValuesActionConfigurationSwitch;
+import org.eclipse.uml2.uml.DataType;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.PrimitiveType;
import org.eclipse.uml2.uml.ValueSpecification;
@@ -55,6 +63,30 @@ public class FeatureValueUtils {
}
try {
+ EClassifier type = feature.getEType();
+ if(type instanceof EEnum) {
+ String value = ((InstanceValue)valueSpecification).getInstance().getName();
+ return ((EEnum)type).getEEnumLiteral(value).getInstance();
+ // return ConverterRegistry.getSingleton().convert(EEnum.class, valueSpecification);
+ } else if(type instanceof EDataType) {
+ final EDataType pType = (EDataType)type;
+ final String name = pType.getName();
+ if("Boolean".equals(name)) {
+ return ConverterRegistry.getSingleton().convert(boolean.class, valueSpecification);
+ } else if("Integer".equals(name)) {
+ return ConverterRegistry.getSingleton().convert(int.class, valueSpecification);
+ } else if("Real".equals(name)) {
+ return ConverterRegistry.getSingleton().convert(double.class, valueSpecification);
+ } else if("String".equals(name)) {
+ return ConverterRegistry.getSingleton().convert(String.class, valueSpecification);
+ } else if("UnlimitedNatural".equals(name)) {
+ return ConverterRegistry.getSingleton().convert(int.class, valueSpecification);
+ } else { //custom PrimitiveType
+ return ConverterRegistry.getSingleton().convert(String.class, valueSpecification);
+ }
+ } else if(type instanceof DataType) {//FIXME manage the data type
+ return ConverterRegistry.getSingleton().convert(String.class, valueSpecification);
+ }
return ConverterRegistry.getSingleton().convert(feature.getEType().getInstanceClass(), valueSpecification);
} catch (ConverterNotfoundException e) {
Activator.log.error("Impossible to convert "+valueSpecification+ " to fit feature type :"+feature, e);
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java
index 6735e1dd390..e27e08a6e78 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf/src/org/eclipse/papyrus/infra/extendedtypes/emf/setvaluesactionconfiguration/SetValuesActionEditHelperAdvice.java
@@ -29,28 +29,33 @@ import org.eclipse.papyrus.infra.extendedtypes.emf.Activator;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-
/**
* advice for the {@link SetValuesActionConfiguration}
*/
public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice<SetValuesActionConfiguration> {
-
+
/** list of the features to set */
- protected Map<String, FeatureValue> featuresToValues = null;
+ //protected Map<String, FeatureValue> featuresToValues = null;
+ /** list of runtime defined features */
+ //protected Map<String, FeatureValue> featuresToRuntimeDefinitions = null;
+
+ /** list of static defined features */
+ protected Map<String, FeatureValue> featuresToStaticDefinitions = null;
/**
* {@inheritDoc}
*/
public void init(SetValuesActionConfiguration configuration) {
- featuresToValues= new HashMap<String, FeatureValue>(); // reset of the map
- if(configuration==null) {
+ //featuresToRuntimeDefinitions = new HashMap<String, FeatureValue>();
+ featuresToStaticDefinitions = new HashMap<String, FeatureValue>();
+ if(configuration == null) {
return;
}
for(FeatureToSet featureToSet : configuration.getFeaturesToSet()) {
- featuresToValues.put(featureToSet.getFeatureName(), featureToSet.getValue());
+ featuresToStaticDefinitions.put(featureToSet.getFeatureName(), featureToSet.getValue());
}
}
-
+
/**
* Default Constructor
*/
@@ -71,7 +76,7 @@ public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice im
protected ICommand getBeforeCreateCommand(CreateElementRequest request) {
return super.getBeforeCreateCommand(request);
}
-
+
/**
* {@inheritDoc}
*/
@@ -79,7 +84,7 @@ public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice im
protected ICommand getAfterCreateCommand(CreateElementRequest request) {
return super.getAfterCreateCommand(request);
}
-
+
/**
* {@inheritDoc}
*/
@@ -107,7 +112,7 @@ public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice im
return null;
}
- for(Entry<String, FeatureValue> featureEntry: featuresToValues.entrySet()) {
+ for(Entry<String, FeatureValue> featureEntry: featuresToStaticDefinitions.entrySet()) {
// retrieve feature value
ICommand command = getSetFeatureValueCommand(elementToConfigure, featureEntry.getKey(), featureEntry.getValue(), service, request);
if(command !=null) {
@@ -118,6 +123,19 @@ public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice im
}
}
}
+
+// if(!featuresToRuntimeDefinitions.isEmpty()) {
+// ICommand command = getDynamicSetFeatureValueCommand(elementToConfigure, featuresToRuntimeDefinitions, service, request);
+// if(command !=null) {
+// if(resultCommand == null) {
+// resultCommand = command;
+// } else {
+// resultCommand = resultCommand.compose(command);
+// }
+// }
+// }
+
+
if(resultCommand!=null) {
return resultCommand.reduce();
}
@@ -126,34 +144,34 @@ public class SetValuesActionEditHelperAdvice extends AbstractEditHelperAdvice im
return super.getAfterConfigureCommand(request);
}
+
/**
- * @param elementToConfigure the eobject to configure
- * @param name the name of the feature to set
- * @param value the new value of the feature
+ * @param elementToConfigure
+ * the eobject to configure
+ * @param name
+ * the name of the feature to set
+ * @param value
+ * the new value of the feature
*/
protected ICommand getSetFeatureValueCommand(EObject elementToConfigure, String name, FeatureValue featureValue, IElementEditService service, ConfigureRequest configureRequest) {
- if(name==null) {
+ if(name == null) {
Activator.log.debug("No feature name has been set.");
return null;
}
- if(elementToConfigure.eClass() ==null) {
- Activator.log.error("Impossible to find EClass from EObject: "+elementToConfigure, null);
+ if(elementToConfigure.eClass() == null) {
+ Activator.log.error("Impossible to find EClass from EObject: " + elementToConfigure, null);
return null;
}
// retrieve structural feature for the element to configure
EStructuralFeature feature = elementToConfigure.eClass().getEStructuralFeature(name);
- if(feature ==null) {
- Activator.log.error("Impossible to find feature "+name+" for eobject "+elementToConfigure, null);
- return null;
+ if(feature == null) {
+ Activator.log.error("Impossible to find feature " + name + " for eobject " + elementToConfigure, null);
+ return null;
}
-
Object value = FeatureValueUtils.getValue(elementToConfigure, feature, featureValue);
-
-
SetRequest request = new SetRequest(elementToConfigure, feature, value);
// duplicate parameters from configure request?
request.addParameters(configureRequest.getParameters());
-
return service.getEditCommand(request);
}
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF
index 123a7bb3b73..410b84c84c5 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/META-INF/MANIFEST.MF
@@ -17,7 +17,6 @@ Export-Package: org.eclipse.papyrus.infra.extendedtypes,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.emf.ecore;bundle-version="2.7.0";visibility:=reexport,
org.eclipse.emf.ecore.xmi;bundle-version="2.6.0";visibility:=reexport,
- org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="0.10.2",
org.eclipse.uml2.types;visibility:=reexport,
org.eclipse.uml2.uml;bundle-version="3.2.0",
org.eclipse.ui;bundle-version="3.7.0",
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
index 5437e9896f8..2fd59656b57 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
@@ -203,5 +203,14 @@
name="Aspect Semantic Type Configuration">
</configuration>
</extension>
+ <extension
+ point="org.eclipse.papyrus.infra.extendedtypes.extendedTypeConfiguration">
+ <configuration
+ configurationClass="org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeConfiguration"
+ description="configuration for view-only element types that have potential aspect actions for creation"
+ factoryClass="org.eclipse.papyrus.infra.extendedtypes.AspectViewTypeFactory"
+ name="Aspect View Type Configuration">
+ </configuration>
+ </extension>
</plugin>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java
new file mode 100644
index 00000000000..07f25277ea4
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src-gen/org/eclipse/papyrus/infra/extendedtypes/AspectViewTypeFactory.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.NullElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+
+
+/**
+ * @author RS211865
+ */
+public class AspectViewTypeFactory extends AbstractConfigurableElementTypeFactory<AspectViewTypeConfiguration> {
+
+ /**
+ * Default Constructor
+ */
+ public AspectViewTypeFactory() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IEditHelperAdvice createEditHelperAdvice(AspectViewTypeConfiguration configuration) {
+// List<SemanticActionConfiguration> semanticActionConfigurations = configuration.getActionConfiguration();
+// List<IEditHelperAdvice> actionAdvices = new ArrayList<IEditHelperAdvice>(semanticActionConfigurations.size());
+// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) {
+// IEditHelperAdvice advice = AspectConfigurationFactoryRegistry.getInstance().createEditHelperAdvice(actionConfiguration);
+// if(advice!=null) {
+// actionAdvices.add(advice);
+//// } else {
+//// Activator.log.error("Impossible to create an advice for :" + actionConfiguration, null);
+// }
+// }
+// if(actionAdvices!=null && actionAdvices.size() > 0) {
+// return new ComposedEditHelperAdvice(actionAdvices);
+// }
+ return new AbstractEditHelperAdvice() {
+
+ };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IContainerDescriptor createContainerDescriptor(AspectViewTypeConfiguration configuration) {
+// List<SemanticActionConfiguration> semanticActionConfigurations = configuration.getActionConfiguration();
+// List<IContainerDescriptor> containerDescriptors = new ArrayList<IContainerDescriptor>(semanticActionConfigurations.size());
+// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) {
+// IContainerDescriptor containerDescriptor = AspectConfigurationFactoryRegistry.getInstance().createContainerDescriptor(actionConfiguration);
+// if(containerDescriptor!=null) {
+// containerDescriptors.add(containerDescriptor);
+//// } else {
+//// Activator.log.error("Impossible to create a container descriptor for :" + actionConfiguration, null);
+// }
+// }
+// if(containerDescriptors!=null && containerDescriptors.size() > 0) {
+// return new ComposedContainerDescriptor(containerDescriptors);
+// }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ICreationElementValidator createElementCreationValidator(AspectViewTypeConfiguration configuration) {
+// List<SemanticActionConfiguration> semanticActionConfigurations = configuration.getActionConfiguration();
+// List<ICreationElementValidator> actionValidators = new ArrayList<ICreationElementValidator>(semanticActionConfigurations.size());
+// for(SemanticActionConfiguration actionConfiguration : semanticActionConfigurations) {
+// ICreationElementValidator validator = AspectConfigurationFactoryRegistry.getInstance().createCreationElementValidator(actionConfiguration);
+// if(validator!=null) {
+// actionValidators.add(validator);
+//// } else {
+//// Activator.log.error("Impossible to create a creation element validator for :" + actionConfiguration, null);
+// }
+// }
+// if(actionValidators!=null && actionValidators.size() > 0) {
+// return new ComposedElementCreationValidator(actionValidators);
+// }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IElementMatcher createElementMatcher(AspectViewTypeConfiguration configuration) {
+ // these element types are there only for creation => it can not be match at any time
+ return new NullElementMatcher();
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
index 16c22c03df3..1160cf3be76 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ElementTypeSetUtils.java
@@ -15,9 +15,8 @@ package org.eclipse.papyrus.infra.extendedtypes;
import java.lang.reflect.Field;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
+import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.SpecializationTypeDescriptor;
+import org.eclipse.gmf.runtime.emf.type.core.internal.impl.SpecializationTypeRegistry;
/**
@@ -33,41 +32,91 @@ public class ElementTypeSetUtils {
}
- /**
- * Unloads a given {@link ExtendedElementTypeSet}
- * @param elementTypeSet the element type set to unload
- */
- public static void unload(ExtendedElementTypeSet elementTypeSet) {
-
- }
- public static void resetRegistry() {
- // FIXME save the current listeners, to add them back to the registry
- IClientContext context;
- try {
- context = TypeContext.getContext();
- } catch (ServiceException e1) {
- Activator.log.error(e1);
- return;
- }
- // impossibe to unregister element types...
- // => destroy the singleton instance of the registry...
- try {
- Field declaredField = ElementTypeRegistry.class.getDeclaredField("INSTANCE");
- declaredField.setAccessible(true);
- declaredField.set(null, null);
- } catch (SecurityException e1) {
- e1.printStackTrace();
- } catch (NoSuchFieldException e1) {
- e1.printStackTrace();
- } catch (IllegalArgumentException e) {
- e.printStackTrace();
- } catch (IllegalAccessException e) {
- e.printStackTrace();
- }
-
- // create the registry
- ElementTypeRegistry.getInstance();
- }
+// public static void unload(String identifier) {
+// // retrieve the extended type set with given identifier and unloads it
+// ExtendedElementTypeSet set = ExtendedElementTypeSetRegistry.getInstance().getExtendedTypeSets().get(identifier);
+// if(set!=null) {
+// unload(set);
+// }
+// }
+
+// /**
+// * Unloads a given {@link ExtendedElementTypeSet}
+// * @param elementTypeSet the element type set to unload
+// */
+// public static void unload(ExtendedElementTypeSet elementTypeSet) {
+// // retrieve the specializationTypeRegistry to remove all contribution from the given element type set
+// Field declaredField = null;
+// try {
+// declaredField = ElementTypeRegistry.class.getDeclaredField("specializationTypeRegistry");
+// } catch (SecurityException e1) {
+// Activator.log.error(e1);
+// return;
+// } catch (NoSuchFieldException e1) {
+// Activator.log.error(e1);
+// return;
+// }
+// if(declaredField==null) {
+// Activator.log.error("impossible to find specializationTypeRegistry", null);
+// return;
+// }
+// declaredField.setAccessible(true);
+// SpecializationTypeRegistry registry = null;
+// try {
+// registry = (SpecializationTypeRegistry)declaredField.get(ElementTypeRegistry.getInstance());
+// } catch (IllegalArgumentException e) {
+// Activator.log.error(e);
+// } catch (IllegalAccessException e) {
+// Activator.log.error(e);
+// }
+//
+// if(registry == null) {
+// return;
+// }
+//
+// for(ElementTypeConfiguration configuration : elementTypeSet.getElementType()) {
+// if(configuration!=null && configuration.getIdentifier()!=null) {
+// String identifier = configuration.getIdentifier();
+// // retrieve descriptor
+// SpecializationTypeDescriptor descriptor = registry.getSpecializationTypeDescriptor(identifier);
+// if(descriptor!=null) {
+// registry.removeSpecializationType(descriptor);
+// }
+// }
+// }
+//
+// elementTypeSet.eResource().unload();
+// elementTypeSet.eResource().getResourceSet().getResources().remove(elementTypeSet.eResource());
+// }
+
+// public static void resetRegistry() {
+// // FIXME save the current listeners, to add them back to the registry
+// IClientContext context;
+// try {
+// context = TypeContext.getContext();
+// } catch (ServiceException e1) {
+// Activator.log.error(e1);
+// return;
+// }
+// // impossibe to unregister element types...
+// // => destroy the singleton instance of the registry...
+// try {
+// Field declaredField = ElementTypeRegistry.class.getDeclaredField("INSTANCE");
+// declaredField.setAccessible(true);
+// declaredField.set(null, null);
+// } catch (SecurityException e1) {
+// e1.printStackTrace();
+// } catch (NoSuchFieldException e1) {
+// e1.printStackTrace();
+// } catch (IllegalArgumentException e) {
+// e.printStackTrace();
+// } catch (IllegalAccessException e) {
+// e.printStackTrace();
+// }
+//
+// // create the registry
+// ElementTypeRegistry.getInstance();
+// }
} \ No newline at end of file
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
index 0388159c3e7..53526b072e0 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedElementTypeSetRegistry.java
@@ -14,6 +14,7 @@ package org.eclipse.papyrus.infra.extendedtypes;
import java.io.IOException;
import java.lang.ref.WeakReference;
+import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Dictionary;
@@ -36,6 +37,9 @@ import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IClientContext;
+import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.IEditHelperAdviceDescriptor;
+import org.eclipse.gmf.runtime.emf.type.core.internal.descriptors.SpecializationTypeDescriptor;
+import org.eclipse.gmf.runtime.emf.type.core.internal.impl.SpecializationTypeRegistry;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.extendedtypes.preferences.ExtendedTypesPreferences;
import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
@@ -52,8 +56,8 @@ public class ExtendedElementTypeSetRegistry {
/** private singleton instance */
private static ExtendedElementTypeSetRegistry registry;
- /** list of retrieved extended type sets */
- protected List<ExtendedElementTypeSet> extendedTypeSets = null;
+ /** Map of retrieved extended type sets, key is their identifier */
+ protected Map<String, ExtendedElementTypeSet> extendedTypeSets = null;
/** unique resource set to load all extended types models */
protected ResourceSet extendedTypesResourceSet = null;
@@ -90,7 +94,54 @@ public class ExtendedElementTypeSetRegistry {
// 2. creates the list only when registry is acceded for the first time, (or on reload?)
extendedTypeSets = loadExtendedTypeSets();
}
+
+ /**
+ * Dispose this registry, i.e. remove all contribution on the element type registry
+ */
+ public void dispose() {
+ if(extendedTypeSets == null){
+ return;
+ }
+ for(Entry<String, ExtendedElementTypeSet> entry: extendedTypeSets.entrySet()) {
+ unload(entry.getKey());
+ }
+ extendedTypesResourceSet = null;
+ extendedTypeSets = null;
+ configurationTypeToElementTypeFactory = new HashMap<String, IExtendedElementTypeFactory<ElementTypeConfiguration>>();
+ // 1. creates the resource set
+ extendedTypesResourceSet = null;
+ registry = null;
+ }
+
+ /**
+ * Loads a given extended type set from a given identifier
+ */
+ public void loadExtendedElementTypeSet(String identifier) {
+ if(getExtendedTypeSets()==null) {
+ return;
+ }
+
+ // retrieve the path from the identifier
+ String path = ExtendedTypesPreferences.getLocalExtendedTypesDefinitions().get(identifier);
+ if(path==null) {
+ return;
+ }
+
+ URI localURI = URI.createPlatformResourceURI(path, true);
+ Resource resource = extendedTypesResourceSet.createResource(localURI);
+ try {
+ resource.load(null);
+ EObject content = resource.getContents().get(0);
+ if(content instanceof ExtendedElementTypeSet) {
+ getExtendedTypeSets().put(identifier, (ExtendedElementTypeSet)content);
+ loadExtendedElementTypeSet((ExtendedElementTypeSet)content);
+ }
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+
/**
* Loads the specified extended element type set.
* This does not take care to unload a similar set (a set with the same id) before loading. This should be handled before calling this method.
@@ -138,10 +189,110 @@ public class ExtendedElementTypeSetRegistry {
ElementTypeRegistry.getInstance().register(type);
context.bindId(type.getId());
}
- // TODO handle errors here: no factory, impossible to create element type from configuration, impossible to register, etc.
}
}
-
+
+ /**
+ * Unloads a given {@link ExtendedElementTypeSet}
+ * @param elementTypeSet the element type set to unload
+ */
+ public void unload(String identifier) {
+ if(extendedTypeSets==null) {
+ return;
+ }
+ ExtendedElementTypeSet elementTypeSet = extendedTypeSets.get(identifier);
+ if(elementTypeSet==null) {
+ return;
+ }
+
+ // retrieve the specializationTypeRegistry to remove all contribution from the given element type set
+ Field declaredField = null;
+ try {
+ declaredField = ElementTypeRegistry.class.getDeclaredField("specializationTypeRegistry");
+ } catch (SecurityException e1) {
+ Activator.log.error(e1);
+ return;
+ } catch (NoSuchFieldException e1) {
+ Activator.log.error(e1);
+ return;
+ }
+ if(declaredField==null) {
+ Activator.log.error("impossible to find specializationTypeRegistry", null);
+ return;
+ }
+ declaredField.setAccessible(true);
+ SpecializationTypeRegistry registry = null;
+ try {
+ registry = (SpecializationTypeRegistry)declaredField.get(ElementTypeRegistry.getInstance());
+ } catch (IllegalArgumentException e) {
+ Activator.log.error(e);
+ } catch (IllegalAccessException e) {
+ Activator.log.error(e);
+ }
+
+ if(registry == null) {
+ return;
+ }
+
+ for(ElementTypeConfiguration configuration : elementTypeSet.getElementType()) {
+ if(configuration!=null && configuration.getIdentifier()!=null) {
+ String configIdentifier = configuration.getIdentifier();
+ // retrieve descriptor
+ SpecializationTypeDescriptor descriptor = registry.getSpecializationTypeDescriptor(configIdentifier);
+ if(descriptor!=null) {
+ // remove also advice bindings specific to this descriptor
+ IEditHelperAdviceDescriptor adviceDescriptor = descriptor.getEditHelperAdviceDescriptor();
+ String targetId = adviceDescriptor.getTypeId();
+ removeAdviceFromBindings(registry, targetId, adviceDescriptor);
+
+ registry.removeSpecializationType(descriptor);
+
+ }
+ }
+ }
+
+ elementTypeSet.eResource().unload();
+ if(extendedTypesResourceSet!=null) {
+ extendedTypesResourceSet.getResources().remove(elementTypeSet.eResource());
+ }
+ }
+
+ protected void removeAdviceFromBindings(SpecializationTypeRegistry registry, String adviceDescriptorId, IEditHelperAdviceDescriptor adviceDescriptor) {
+ // retrieve the specializationTypeRegistry to remove all contribution from the given element type set
+ Map<?, ?> adviceBindings = null;
+ Field adviceBindingsField = null;
+ try {
+ adviceBindingsField = SpecializationTypeRegistry.class.getDeclaredField("adviceBindings");
+ } catch (SecurityException e1) {
+ Activator.log.error(e1);
+ return;
+ } catch (NoSuchFieldException e1) {
+ Activator.log.error(e1);
+ return;
+ }
+ if(adviceBindingsField==null) {
+ Activator.log.error("impossible to find adviceBindings", null);
+ return;
+ }
+ adviceBindingsField.setAccessible(true);
+ try {
+ adviceBindings = (Map<?,?>)adviceBindingsField.get(registry);
+ } catch (IllegalArgumentException e) {
+ Activator.log.error(e);
+ } catch (IllegalAccessException e) {
+ Activator.log.error(e);
+ }
+ if(adviceBindings!=null) {
+ Set<?> bindings = (Set<?>)adviceBindings.get(adviceDescriptorId);
+ if(bindings!=null) {
+ bindings.remove(adviceDescriptor);
+ }
+ }
+ }
+
+
+
+
/**
* check this configuration type has not already caused issues du
*
@@ -178,22 +329,22 @@ public class ExtendedElementTypeSetRegistry {
/**
* Retrieves and loads extended type sets registered in the platform. It should also load configuration sets from the workspace.
*/
- protected List<ExtendedElementTypeSet> loadExtendedTypeSets() {
- List<ExtendedElementTypeSet> extendedElementTypeSets = new ArrayList<ExtendedElementTypeSet>();
+ protected Map<String, ExtendedElementTypeSet> loadExtendedTypeSets() {
+ Map<String, ExtendedElementTypeSet> extendedElementTypeSets = new HashMap<String, ExtendedElementTypeSet>();
// 1. retrieve from the workspace
Map<String, ExtendedElementTypeSet> localSets = loadExtendedTypeSetsFromWorkspace();
if(localSets != null && !localSets.isEmpty()) {
- extendedElementTypeSets.addAll(localSets.values());
+ extendedElementTypeSets.putAll(localSets);
}
// 2. retrieve from the platform. If already in workspace (id), do not load the platform ones
Map<String, ExtendedElementTypeSet> registeredSets = loadExtendedTypeSetsFromPlatform(localSets.keySet());
if(registeredSets != null && !registeredSets.isEmpty()) {
- extendedElementTypeSets.addAll(registeredSets.values());
+ extendedElementTypeSets.putAll(registeredSets);
}
// load each extended element type set
- for(ExtendedElementTypeSet extendedElementTypeSet : extendedElementTypeSets) {
- loadExtendedElementTypeSet(extendedElementTypeSet);
+ for(Entry<String, ExtendedElementTypeSet> entry : extendedElementTypeSets.entrySet()) {
+ loadExtendedElementTypeSet(entry.getValue());
}
return extendedElementTypeSets;
}
@@ -468,10 +619,9 @@ public class ExtendedElementTypeSetRegistry {
}
/**
- *
+ * @return the extendedTypeSets
*/
- public void reset() {
- init();
-
+ public Map<String, ExtendedElementTypeSet> getExtendedTypeSets() {
+ return extendedTypeSets;
}
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
index e3b45cf1231..6a25cdf0536 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/ExtendedTypeRegistryService.java
@@ -42,8 +42,7 @@ public class ExtendedTypeRegistryService implements IService {
*/
public void disposeService() throws ServiceException {
// extended element type set registry should unregister all added element types in the gmf registry
- ElementTypeSetUtils.resetRegistry();
-
+ ExtendedElementTypeSetRegistry.getInstance().dispose();
}
public ExtendedElementTypeSetRegistry getExtendedElementTypeSetRegistry() {
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java
new file mode 100644
index 00000000000..d6f64e229fd
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/IEditHelperAdviceConstants.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.extendedtypes;
+
+
+/**
+ * Constants used by Papyrus edit helper advices
+ */
+public interface IEditHelperAdviceConstants {
+
+ public String NO_UI_KEY = "no_ui";
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java
index 720216a04f7..68a6ed2f951 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/DeployExtendedTypeSetConfigurationHandler.java
@@ -126,12 +126,9 @@ public class DeployExtendedTypeSetConfigurationHandler extends AbstractHandler i
ExtendedTypesPreferences.registerWorkspaceDefinition(fileName, selectedFile.getFullPath().toString());
monitor.subTask("Reset Element Types Registry");
- ElementTypeSetUtils.resetRegistry();
+ ExtendedElementTypeSetRegistry.getInstance().loadExtendedElementTypeSet(fileName);
monitor.worked(1);
- // relaunch papyrus service
- ExtendedElementTypeSetRegistry.getInstance().reset();
-
result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully deployed and activated"));
}
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java
index 5b3734ae03c..35753a5c294 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/src/org/eclipse/papyrus/infra/extendedtypes/handler/UndeployExtendedTypeSetConfigurationHandler.java
@@ -125,11 +125,10 @@ public class UndeployExtendedTypeSetConfigurationHandler extends AbstractHandler
ExtendedTypesPreferences.unregisterWorkspaceDefinition(fileName);
monitor.subTask("Reset Element Types Registry");
- ElementTypeSetUtils.resetRegistry();
+ ExtendedElementTypeSetRegistry.getInstance().unload(fileName);
monitor.worked(1);
// relaunch papyrus service
- ExtendedElementTypeSetRegistry.getInstance().reset();
result.add(new Status(IStatus.OK, Activator.PLUGIN_ID, "The extended types configuration has been successfully undeployed"));
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
index eb7699170ff..53139dc30a4 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/META-INF/MANIFEST.MF
@@ -34,6 +34,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="0.10.2",
org.eclipse.gmf.tooling.runtime;bundle-version="3.1.0",
org.eclipse.papyrus.uml.diagram.composite;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="0.10.2",
org.eclipse.papyrus.infra.tools;bundle-version="0.10.2"
Export-Package: org.eclipse.papyrus.gmf.diagram.common.commands,
org.eclipse.papyrus.gmf.diagram.common.compatibility,
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
index 3574d5bf156..811efd555bb 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockCompositeSemanticEditPolicy.java
@@ -13,10 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +37,17 @@ public class BlockCompositeSemanticEditPolicy extends CompartmentSemanticEditPol
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ }
+ }
+
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
index 109620e6292..7bacaff00ba 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyCompositeSemanticEditPolicy.java
@@ -13,11 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -42,18 +47,39 @@ public class BlockPropertyCompositeSemanticEditPolicy extends DefaultSemanticEdi
if ((eObject != null) && (eObject instanceof Property)) {
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) {
+ baseType = SysMLElementTypes.FLOW_PORT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(UMLElementTypes.PORT )) {
+ baseType = UMLElementTypes.PORT ;
+ }
+ }
+
- if((SysMLElementTypes.FLOW_PORT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType())
- || (UMLElementTypes.PORT == req.getElementType())) {
+ if((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
req.setContainer(type);
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
index 602faec3a25..8c1f4a10c5e 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/BlockPropertyStructureCompartmentSemanticEditPolicy.java
@@ -14,13 +14,16 @@
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
import java.util.Arrays;
+import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -50,36 +53,46 @@ public class BlockPropertyStructureCompartmentSemanticEditPolicy extends Compart
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ } else if(superTypes.contains(UMLElementTypes.PROPERTY)) {
+ baseType = UMLElementTypes.PROPERTY;
+ }
+
+ }
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
- }
-
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ }else if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
- }
-
- if(UMLElementTypes.PROPERTY == req.getElementType()) {
+ } else if(UMLElementTypes.PROPERTY == baseType) {
req.setContainer(type);
- }
-
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ } else if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
req.setContainer(type);
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
-
-
} else if ((UMLElementTypes.PROPERTY == req.getElementType()) || (Arrays.asList(req.getElementType().getAllSuperTypes()).contains(UMLElementTypes.PROPERTY))) {
// Forbid Property::qualifier creation
return UnexecutableCommand.INSTANCE;
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
index 73254855eb7..57b7574e813 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ConstraintParameterCompartmentSemanticEditPolicy.java
@@ -13,11 +13,17 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.ConfigureFeatureCommandFactory;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.UMLPackage;
@@ -33,7 +39,17 @@ public class ConstraintParameterCompartmentSemanticEditPolicy extends Compartmen
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(UMLElementTypes.PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(UMLElementTypes.PROPERTY)) {
+ baseType = UMLElementTypes.PROPERTY;
+ }
+ }
+
+ if(UMLElementTypes.PROPERTY == baseType) {
String name = NamedElementUtil.getDefaultNameWithIncrementFromBase("parameter", req.getContainer().eContents()); //$NON-NLS-1$
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new ConfigureFeatureCommandFactory(UMLPackage.eINSTANCE.getNamedElement_Name(), name));
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
index c7e2101c312..e1d81eb1ef0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/FlowPortCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class FlowPortCompartmentSemanticEditPolicy extends CompartmentSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ }
+ }
+
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
index 87879341944..6d7d2500c9d 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/NestedBlockPropertyCompositeSemanticEditPolicy.java
@@ -13,11 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.DefaultSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateFlowPortWithFlowSpecificationConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -44,17 +49,38 @@ public class NestedBlockPropertyCompositeSemanticEditPolicy extends DefaultSeman
Type type = ((Property) eObject).getType();
if ((type != null) && (((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(type))) {
- if((SysMLElementTypes.FLOW_PORT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_IN_OUT == req.getElementType())
- || (SysMLElementTypes.FLOW_PORT_NA == req.getElementType())
- || (UMLElementTypes.PORT == req.getElementType())) {
+
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.FLOW_PORT)) {
+ baseType = SysMLElementTypes.FLOW_PORT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_IN_OUT)) {
+ baseType = SysMLElementTypes.FLOW_PORT_IN_OUT;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(UMLElementTypes.PORT )) {
+ baseType = UMLElementTypes.PORT ;
+ }
+ }
+
+ if((SysMLElementTypes.FLOW_PORT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN == baseType)
+ || (SysMLElementTypes.FLOW_PORT_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_IN_OUT == baseType)
+ || (SysMLElementTypes.FLOW_PORT_NA == baseType)
+ || (UMLElementTypes.PORT == baseType)) {
req.setContainer(type);
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
index 622dd608d3b..d9e20429fa0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PartCompartmentSemanticEditPolicy.java
@@ -13,10 +13,16 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
+import org.eclipse.papyrus.sysml.blocks.Block;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreatePartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -32,11 +38,24 @@ public class PartCompartmentSemanticEditPolicy extends CompartmentSemanticEditPo
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
index ed795654df5..7da2226fed0 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/PropertyCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -36,22 +41,43 @@ public class PropertyCompartmentSemanticEditPolicy extends CompartmentSemanticEd
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.FLOW_PORT_NA)) {
+ baseType = SysMLElementTypes.FLOW_PORT_NA;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.ACTOR_PART_PROPERTY ==baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.FLOW_PORT_NA == req.getElementType()) {
+ if(SysMLElementTypes.FLOW_PORT_NA == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateFlowPortWithFlowSpecificationConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
index 19e6472a30e..b1a0317456f 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ReferenceCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateReferenceWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class ReferenceCompartmentSemanticEditPolicy extends CompartmentSemanticE
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
index f045b8976ee..2aa9a51e4c2 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/StructureCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateActorPartWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateConstraintPropertyWithTypeConfigureCommandFactory;
@@ -35,23 +40,41 @@ public class StructureCompartmentSemanticEditPolicy extends CompartmentSemanticE
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.PART_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.PART_PROPERTY)) {
+ baseType = SysMLElementTypes.PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.REFERENCE_PROPERTY)) {
+ baseType = SysMLElementTypes.REFERENCE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.ACTOR_PART_PROPERTY)) {
+ baseType = SysMLElementTypes.ACTOR_PART_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ } else if(superTypes.contains(SysMLElementTypes.CONSTRAINT_PROPERTY)) {
+ baseType = SysMLElementTypes.CONSTRAINT_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreatePartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.REFERENCE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.REFERENCE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateReferenceWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.ACTOR_PART_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.ACTOR_PART_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateActorPartWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
- if(SysMLElementTypes.CONSTRAINT_PROPERTY == req.getElementType()) {
+ if(SysMLElementTypes.CONSTRAINT_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateConstraintPropertyWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
index 23d354a9d40..bd61d2b09be 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-common-sysml/org/eclipse/papyrus/sysml/diagram/common/edit/policy/ValueCompartmentSemanticEditPolicy.java
@@ -13,9 +13,14 @@
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.common.edit.policy;
+import java.util.Arrays;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.papyrus.gmf.diagram.common.edit.policy.CompartmentSemanticEditPolicy;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.services.edit.commands.IConfigureCommandFactory;
import org.eclipse.papyrus.sysml.diagram.common.commands.CreateValueWithTypeConfigureCommandFactory;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
@@ -31,7 +36,17 @@ public class ValueCompartmentSemanticEditPolicy extends CompartmentSemanticEditP
@Override
protected Command getCreateCommand(CreateElementRequest req) {
- if(SysMLElementTypes.VALUE_PROPERTY == req.getElementType()) {
+ IElementType elementTypeToCreate = req.getElementType();
+ IElementType baseType = elementTypeToCreate;
+ //if extended type, retrieve the sysml closest element element type
+ if(elementTypeToCreate instanceof IExtendedHintedElementType) {
+ List<IElementType> superTypes = Arrays.asList(elementTypeToCreate.getAllSuperTypes());
+ if(superTypes.contains(SysMLElementTypes.VALUE_PROPERTY)) {
+ baseType = SysMLElementTypes.VALUE_PROPERTY;
+ }
+ }
+
+ if(SysMLElementTypes.VALUE_PROPERTY == baseType) {
req.setParameter(IConfigureCommandFactory.CONFIGURE_COMMAND_FACTORY_ID, new CreateValueWithTypeConfigureCommandFactory());
}
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
index 1df4759d80e..705540b338a 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/META-INF/MANIFEST.MF
@@ -11,7 +11,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.uml2.uml.profile.l2;bundle-version="1.0.0",
org.eclipse.core.expressions,
org.eclipse.papyrus.infra.tools;bundle-version="0.10.2",
- org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.2"
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="0.10.2",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.2"
Export-Package: org.eclipse.papyrus.sysml.service.types,
org.eclipse.papyrus.sysml.service.types.command,
org.eclipse.papyrus.sysml.service.types.element,
@@ -30,4 +31,3 @@ Bundle-Activator: org.eclipse.papyrus.sysml.service.types.Activator
Bundle-SymbolicName: org.eclipse.papyrus.sysml.service.types;singleton
:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java
index 0f69b4d04e0..a8794ba91cd 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/AssociationNoneEditHelperAdvice.java
@@ -1,233 +1,233 @@
-/*****************************************************************************
- * Copyright (c) 2011-2012 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.service.types.helper.advice;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
-import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.sysml.service.types.Activator;
-import org.eclipse.papyrus.uml.service.types.utils.ClassifierUtils;
-import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Classifier;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * Edit helper advice for {@link Association} with "aggregation = none" (used for creation purpose only).
- */
-public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice {
-
- /**
- * This method provides the source type provided as {@link ConfigureRequest} parameter.
- *
- * @return the target role
- */
- protected Classifier getSourceOwnerType(ConfigureRequest req) {
- Classifier result = null;
- Object paramObject = req.getParameter(CreateRelationshipRequest.SOURCE);
- if(paramObject instanceof Classifier) {
- result = (Classifier)paramObject;
- }
-
- return result;
- }
-
- /**
- * This method provides the target type provided as {@link ConfigureRequest} parameter.
- *
- * @return the target role
- */
- protected Classifier getTargetOwnerType(ConfigureRequest req) {
- Classifier result = null;
- Object paramObject = req.getParameter(CreateRelationshipRequest.TARGET);
- if(paramObject instanceof Classifier) {
- result = (Classifier)paramObject;
- }
-
- return result;
- }
-
- /**
- * Creates a new {@link Property} from the propertyType in the propertyContainer
- *
- * @param propertyContainer
- * the container of the {@link Property}
- * @param propertyType
- * the type of the {@link Property}
- * @return the new {@link Property}
- * @throws ExecutionException
- */
- protected Property createTargetProperty(Property targetProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- addSourceInModel(targetProperty, propertyContainer, propertyType, association);
- setPropertyType(targetProperty, propertyType, editingDomain, progressMonitor, info);
- setPropertyName(targetProperty);
- return targetProperty;
- }
-
- protected Property createSourceProperty(Property sourceProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- addTargetInModel(sourceProperty, propertyContainer, propertyType, association);
- setPropertyType(sourceProperty, propertyType, editingDomain, progressMonitor, info);
- setPropertyName(sourceProperty);
- return sourceProperty;
- }
-
- protected void setPropertyType(Property property, Type propertyType, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- // Set type using all AdviceHelper (use ServiceEdit instead of manually set)
- SetRequest request = new SetRequest(property, UMLPackage.eINSTANCE.getTypedElement_Type(), propertyType);
- request.setEditingDomain(editingDomain);
- IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(property);
- ICommand editCommand = commandProvider.getEditCommand(request);
- editCommand.execute(progressMonitor, info);
- }
-
- private void setPropertyName(Property property) {
- String baseName = property.getType().getName().toLowerCase();
- Element owner = property.getOwner();
- if (owner instanceof Classifier) {
- List<Property> ownedAttributes = ClassifierUtils.getOwnedAttributes((Classifier)owner);
- String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(
- property.getType().getName().toLowerCase(), ownedAttributes, "_");
- property.setName(defaultNameWithIncrementFromBase);
- }
- else {
- // default
- property.setName(baseName);
- }
- }
-
- /**
- * This method has to be specialized by subclasses (AggregationKind)
- * @param sourceProperty
- * The property to configure
- */
- protected void configureSourceProperty(Property sourceProperty) {
- // do nothing
- }
-
- /**
- * This method has to be specialized by subclasses (AggregationKind)
- * @param sourceProperty
- * The property to configure
- */
- protected void configureTargetProperty(Property targetProperty) {
- // do nothing
- }
-
- /**
- * This method has to be specialized by subclasses (owner)
- *
- * @param sourceEnd
- * the semantic end
- * @param owner
- * the end container
- * @param targetType
- * the target type
- * @param association
- * the association
- * @throws UnsupportedOperationException
- */
- protected void addSourceInModel(final Property sourceEnd, Classifier owner, Type targetType, Association association) throws UnsupportedOperationException {
- // set the container in order to allow Stereotype appliance
- boolean added = ClassifierUtils.addOwnedAttribute(owner, sourceEnd);
- if(!added) {
- throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
- }
- }
-
- /**
- * This method has to be specialized by subclasses (owner)
- *
- * @param targetEnd
- * the semantic end
- * @param owner
- * the end container
- * @param sourceType
- * the source type
- * @param association
- * the association
- * @throws UnsupportedOperationException
- */
- protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
- // set the container in order to allow Stereotype appliance
- boolean added = ClassifierUtils.addOwnedAttribute(owner, targetEnd);
- if(!added) {
- throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
- }
- }
-
- /**
- * <pre>
- * {@inheritDoc}
- *
- * Complete the {@link Association} creation by setting its ends.
- *
- * </pre>
- */
- @Override
- protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
-
- final Association association = (Association)request.getElementToConfigure();
- final Classifier sourceType = getSourceOwnerType(request);
- final Classifier targetType = getTargetOwnerType(request);
-
- if((sourceType == null) || (targetType == null)) {
- return UnexecutableCommand.INSTANCE;
- }
-
- return new ConfigureElementCommand(request) {
-
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
-
- try {
- Property targetProperty = UMLFactory.eINSTANCE.createProperty();
- Property sourceProperty = UMLFactory.eINSTANCE.createProperty();
-
- // TODO: problem with SysML. Link are inversed. A -> B => memberEnd={a, b} instead of {b, a}.
- // Problem seems to come from cached derivedFeature /endTypes
- // So we force to set memberEnd in this order before doing anything with the created properties
- association.getMemberEnds().add(targetProperty);
- association.getMemberEnds().add(sourceProperty);
-
- // Create source and target ends
- createTargetProperty(targetProperty, sourceType, targetType, association, request.getEditingDomain(), progressMonitor, info);
- configureSourceProperty(targetProperty);
- createSourceProperty(sourceProperty, targetType, sourceType, association, request.getEditingDomain(), progressMonitor, info);
- configureTargetProperty(sourceProperty);
-
- } catch (Exception e) {
- Activator.log.error(e);
- return CommandResult.newCancelledCommandResult();
- }
-
- return CommandResult.newOKCommandResult(association);
- }
- };
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.ConfigureElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.sysml.service.types.Activator;
+import org.eclipse.papyrus.uml.service.types.utils.ClassifierUtils;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Edit helper advice for {@link Association} with "aggregation = none" (used for creation purpose only).
+ */
+public class AssociationNoneEditHelperAdvice extends AssociationEditHelperAdvice {
+
+ /**
+ * This method provides the source type provided as {@link ConfigureRequest} parameter.
+ *
+ * @return the target role
+ */
+ protected Classifier getSourceOwnerType(ConfigureRequest req) {
+ Classifier result = null;
+ Object paramObject = req.getParameter(CreateRelationshipRequest.SOURCE);
+ if(paramObject instanceof Classifier) {
+ result = (Classifier)paramObject;
+ }
+
+ return result;
+ }
+
+ /**
+ * This method provides the target type provided as {@link ConfigureRequest} parameter.
+ *
+ * @return the target role
+ */
+ protected Classifier getTargetOwnerType(ConfigureRequest req) {
+ Classifier result = null;
+ Object paramObject = req.getParameter(CreateRelationshipRequest.TARGET);
+ if(paramObject instanceof Classifier) {
+ result = (Classifier)paramObject;
+ }
+
+ return result;
+ }
+
+ /**
+ * Creates a new {@link Property} from the propertyType in the propertyContainer
+ *
+ * @param propertyContainer
+ * the container of the {@link Property}
+ * @param propertyType
+ * the type of the {@link Property}
+ * @return the new {@link Property}
+ * @throws ExecutionException
+ */
+ protected Property createTargetProperty(Property targetProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ setPropertyType(targetProperty, propertyType, editingDomain, progressMonitor, info);
+ setPropertyName(targetProperty);
+ return targetProperty;
+ }
+
+ protected Property createSourceProperty(Property sourceProperty, Classifier propertyContainer, Type propertyType, Association association, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ setPropertyType(sourceProperty, propertyType, editingDomain, progressMonitor, info);
+ setPropertyName(sourceProperty);
+ return sourceProperty;
+ }
+
+ protected void setPropertyType(Property property, Type propertyType, TransactionalEditingDomain editingDomain, IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // Set type using all AdviceHelper (use ServiceEdit instead of manually set)
+ SetRequest request = new SetRequest(property, UMLPackage.eINSTANCE.getTypedElement_Type(), propertyType);
+ request.setEditingDomain(editingDomain);
+ IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(property);
+ ICommand editCommand = commandProvider.getEditCommand(request);
+ editCommand.execute(progressMonitor, info);
+ }
+
+ private void setPropertyName(Property property) {
+ String baseName = property.getType().getName().toLowerCase();
+ Element owner = property.getOwner();
+ if (owner instanceof Classifier) {
+ List<Property> ownedAttributes = ClassifierUtils.getOwnedAttributes((Classifier)owner);
+ String defaultNameWithIncrementFromBase = NamedElementHelper.getDefaultNameWithIncrementFromBase(
+ property.getType().getName().toLowerCase(), ownedAttributes, "_");
+ property.setName(defaultNameWithIncrementFromBase);
+ }
+ else {
+ // default
+ property.setName(baseName);
+ }
+ }
+
+ /**
+ * This method has to be specialized by subclasses (AggregationKind)
+ * @param sourceProperty
+ * The property to configure
+ */
+ protected void configureSourceProperty(Property sourceProperty) {
+ // do nothing
+ }
+
+ /**
+ * This method has to be specialized by subclasses (AggregationKind)
+ * @param sourceProperty
+ * The property to configure
+ */
+ protected void configureTargetProperty(Property targetProperty) {
+ // do nothing
+ }
+
+ /**
+ * This method has to be specialized by subclasses (owner)
+ *
+ * @param sourceEnd
+ * the semantic end
+ * @param owner
+ * the end container
+ * @param targetType
+ * the target type
+ * @param association
+ * the association
+ * @throws UnsupportedOperationException
+ */
+ protected void addSourceInModel(final Property sourceEnd, Classifier owner, Type targetType, Association association) throws UnsupportedOperationException {
+ // set the container in order to allow Stereotype appliance
+ boolean added = ClassifierUtils.addOwnedAttribute(owner, sourceEnd);
+ if(!added) {
+ throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
+ }
+ }
+
+ /**
+ * This method has to be specialized by subclasses (owner)
+ *
+ * @param targetEnd
+ * the semantic end
+ * @param owner
+ * the end container
+ * @param sourceType
+ * the source type
+ * @param association
+ * the association
+ * @throws UnsupportedOperationException
+ */
+ protected void addTargetInModel(Property targetEnd, Classifier owner, Type sourceType, Association association) {
+ // set the container in order to allow Stereotype appliance
+ boolean added = ClassifierUtils.addOwnedAttribute(owner, targetEnd);
+ if(!added) {
+ throw new UnsupportedOperationException("Cannot add a Property on Classifier " + owner.getQualifiedName());
+ }
+ }
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * Complete the {@link Association} creation by setting its ends.
+ *
+ * </pre>
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(final ConfigureRequest request) {
+
+ final Association association = (Association)request.getElementToConfigure();
+ final Classifier sourceType = getSourceOwnerType(request);
+ final Classifier targetType = getTargetOwnerType(request);
+
+ if((sourceType == null) || (targetType == null)) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return new ConfigureElementCommand(request) {
+
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+
+ try {
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ Property sourceProperty = UMLFactory.eINSTANCE.createProperty();
+
+ // TODO: problem with SysML. Link are inversed. A -> B => memberEnd={a, b} instead of {b, a}.
+ // Problem seems to come from cached derivedFeature /endTypes
+ // So we force to set memberEnd in this order before doing anything with the created properties
+ association.getMemberEnds().add(targetProperty);
+ association.getMemberEnds().add(sourceProperty);
+
+ // Create source and target ends
+ addSourceInModel(targetProperty, sourceType, targetType, association);
+ addTargetInModel(sourceProperty, targetType, sourceType, association);
+ createTargetProperty(targetProperty, sourceType, targetType, association, request.getEditingDomain(), progressMonitor, info);
+ configureSourceProperty(targetProperty);
+ createSourceProperty(sourceProperty, targetType, sourceType, association, request.getEditingDomain(), progressMonitor, info);
+ configureTargetProperty(sourceProperty);
+
+ } catch (Exception e) {
+ Activator.log.error(e);
+ return CommandResult.newCancelledCommandResult();
+ }
+
+ return CommandResult.newOKCommandResult(association);
+ }
+ };
+ }
+}
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java
index 5c174e570ae..316f82fe411 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/helper/advice/PropertyEditHelperAdvice.java
@@ -1,316 +1,360 @@
-/*****************************************************************************
- * Copyright (c) 2011-2012 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.service.types.helper.advice;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
-import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
-import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
-import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
-import org.eclipse.papyrus.sysml.service.types.Activator;
-import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
-import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
-import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
-import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Association;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Port;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.UMLFactory;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.eclipse.uml2.uml.util.UMLUtil;
-import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
-
-/**
- * <pre>
- * This HelperAdvice completes {@link Property} edit commands with:
- * - possibly required (sysML) association re-factor command.
- * </pre>
- */
-public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice {
-
- /**
- * <pre>
- * {@inheritDoc}
- *
- * While setting {@link Property} (excluding {@link Port} and {@link ConstraintParameter} type:
- * - add possibly required (sysML) association re-factor command when needed.
- * - add/remove possibly required ConstraintProperty stereotype when needed.
- * </pre>
- */
- @SuppressWarnings("unchecked")
- @Override
- protected ICommand getBeforeSetCommand(SetRequest request) {
- ICommand gmfCommand = super.getBeforeSetCommand(request);
-
- EObject elementToEdit = request.getElementToEdit();
- if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) &&
- (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() instanceof Type)) {
-
- Property propertyToEdit = (Property)elementToEdit;
-
- // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
- if (request.getValue() instanceof org.eclipse.uml2.uml.Class) {
- ICommand stereotypeApplicationCommand = getConstraintPropertyStereotypeApplicationCommand(propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue(), request);
- gmfCommand = CompositeCommand.compose(gmfCommand, stereotypeApplicationCommand);
- }
-
- // Exclude ConstraintParameter (simple property without ConstraintProperty stereotype owned by a ConstraintBlock)
- if (propertyToEdit.eContainer() instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element)propertyToEdit.eContainer(), ConstraintBlock.class) != null) {
- if (UMLUtil.getStereotypeApplication(propertyToEdit, ConstraintProperty.class) == null) {
- return gmfCommand;
- }
- }
-
- Association relatedAssociation = propertyToEdit.getAssociation();
-
- // The edited property has to be related to a SysML association
- if((relatedAssociation == null) || !(ElementUtil.hasNature(relatedAssociation, SysMLElementTypes.SYSML_NATURE))) {
-
- // If no association exist and the new type is a Block
- // (not a ConstraintBlock => a property typed by a ConstraintBlock is a ConstraintProperty, not a Part neither a Reference),
- // add the association
- if ((relatedAssociation == null)
- && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue())
- && !((ISpecializationType) SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type) request.getValue())
- && ((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches(propertyToEdit.eContainer())) {
-
- ICommand addAssociationCommand = getCreatePartAssociationCommand((org.eclipse.uml2.uml.Class)propertyToEdit.eContainer(), propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue());
- gmfCommand = CompositeCommand.compose(gmfCommand, addAssociationCommand);
- }
-
- return gmfCommand;
- }
-
- // Setting new type can be related to an association re-orient (or trigger the association re-orient)
- // Retrieve elements already under re-factor.
- List<EObject> currentlyRefactoredElements = (request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) != null) ? (List<EObject>)request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) : new ArrayList<EObject>();
- if(!currentlyRefactoredElements.contains(propertyToEdit)) {
- currentlyRefactoredElements.add(propertyToEdit);
- request.getParameters().put(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS, currentlyRefactoredElements);
-
- // Current association already under re-factor ?
- if(currentlyRefactoredElements.contains(relatedAssociation)) {
- return gmfCommand;
- }
- }
-
- // If the new type is not a block, destroy related association
- // This must be done only if the setting of the property type is not part of an association re-orient (hence after the previous code-block),
- // otherwise there is no legitimate reason to destroy the existing association while re-orienting it.
- if (!((ISpecializationType) SysMLElementTypes.BLOCK).getMatcher().matches((Type) request.getValue()) && propertyToEdit.getType() != null) {
- ICommand destroyCommand = getDestroyPartAssociationCommand(relatedAssociation, propertyToEdit);
- gmfCommand = CompositeCommand.compose(gmfCommand, destroyCommand);
-
- return gmfCommand;
- }
-
- ICommand refactorCommand = getAssociationRefactoringCommand(propertyToEdit, relatedAssociation, request);
- gmfCommand = CompositeCommand.compose(gmfCommand, refactorCommand);
- }
-
- if(gmfCommand != null) {
- gmfCommand = gmfCommand.reduce();
- }
-
- return gmfCommand;
- }
-
- /**
- * Create a re-factoring command related to a Property move.
- *
- * @param setProperty
- * the property which type is set
- * @param associationToRefactor
- * the association to re-factor (re-orient action)
- * @param request
- * the original set request
- * @return the re-factoring command
- */
- private ICommand getAssociationRefactoringCommand(Property setProperty, Association associationToRefactor, SetRequest request) {
-
- Association relatedAssociation = setProperty.getAssociation(); // Should not be null, test before calling method.
-
- if (associationToRefactor.getMemberEnds().size() >= 2) {
- // Re-orient the related association (do not use edit service to avoid infinite loop here)
- int direction = ReorientRelationshipRequest.REORIENT_TARGET;
- if(setProperty == associationToRefactor.getMemberEnds().get(1)) {
- direction = ReorientRelationshipRequest.REORIENT_SOURCE;
- }
-
- ReorientRelationshipRequest reorientRequest = new ReorientRelationshipRequest(relatedAssociation, (Type)request.getValue(), setProperty.eContainer(), direction);
- reorientRequest.addParameters(request.getParameters());
-
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relatedAssociation);
- if(provider != null) {
- return provider.getEditCommand(reorientRequest);
- }
- }
-
- return null;
- }
-
- /**
- * Create a part association creation command.
- *
- * @return the part association creation command
- */
- private ICommand getCreatePartAssociationCommand(final org.eclipse.uml2.uml.Class sourceBlock, final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock) {
-
- return new AbstractCommand("Create part association") {
-
- @Override
- protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- Association association = UMLFactory.eINSTANCE.createAssociation();
-
- // Add the association in the model
- org.eclipse.uml2.uml.Package container = (org.eclipse.uml2.uml.Package)EMFCoreUtil.getLeastCommonContainer(Arrays.asList(new EObject[]{sourceBlock, targetBlock}), UMLPackage.eINSTANCE.getPackage());
- container.getPackagedElements().add(association);
-
- // Use existing Property as source...
- association.getMemberEnds().add(sourceProperty);
- // ... and create the opposite (unnamed) Property
- Property targetProperty = UMLFactory.eINSTANCE.createProperty();
- association.getOwnedEnds().add(targetProperty);
-
- // Set Association name
- // Initialize the element name based on the created IElementType
- String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(UMLPackage.eINSTANCE.getAssociation().getName(), association.eContainer().eContents());
- association.setName(initializedName);
-
- // Add SysML Nature on the new Association
- ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
-
- return CommandResult.newOKCommandResult(association) ;
- }
- };
-
- }
-
- /**
- * Apply/remove the ConstraintProperty stereotype application
- *
- * @return the ConstraintProperty stereotype application command
- */
- private ICommand getConstraintPropertyStereotypeApplicationCommand(final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock, final SetRequest request) {
-
- return new AbstractTransactionalCommand(request.getEditingDomain(), "Apply/Remove ConstraintProperty Stereotype", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
- // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
- ConstraintProperty constraintPropertyApplication = UMLUtil.getStereotypeApplication(sourceProperty, ConstraintProperty.class);
- if (UMLUtil.getStereotypeApplication(targetBlock, ConstraintBlock.class) != null) {
- if (constraintPropertyApplication == null) {
- StereotypeApplicationHelper.INSTANCE.applyStereotype(sourceProperty, ConstraintsPackage.eINSTANCE.getConstraintProperty());
- final String diagramType = null;
- // Remove representations
- Set<View> memberViewsToDestroy = CrossReferencerUtil.getCrossReferencingViews(sourceProperty, diagramType);
- if (memberViewsToDestroy.size() != 0) {
- final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- final String DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY = "displayMessageForTypingActionPreferenceKey";
- boolean contains = store.contains(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
- if(!contains) {
- store.setValue(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
- store.setDefault(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
- }
- final String hideValue = store.getString(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
- if(!hideValue.equals(MessageDialogWithToggle.ALWAYS)) {
- int size = memberViewsToDestroy.size();
- MessageDialogWithToggle.openInformation(Display.getDefault().getActiveShell(),
- "Change Type Action",
- "WARNING! Typing a Property by a ConstraintBlock make this property become a ConstraintProperty. ConstraintProperty have a specific representation. "
- + "\nSo all representations of this property will be removed from the model (" + size + " occurence" + ((size > 1) ? "s" : "") + ")."
- , "Don't show this dialog the next time",
- false, store, DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
- }
-
- }
- for (View view : memberViewsToDestroy) {
- final DestroyElementRequest destroyRequest = new DestroyElementRequest(request.getEditingDomain(), view, false);
- final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(view);
- ICommand editCommand = commandProvider.getEditCommand(destroyRequest);
- editCommand.execute(progressMonitor, info);
- }
- }
- }
- else {
- if (constraintPropertyApplication != null) {
- StereotypeApplicationHelper.INSTANCE.removeFromContainmentList(sourceProperty, constraintPropertyApplication);
- }
- }
- return CommandResult.newOKCommandResult(sourceProperty) ;
- }
- };
- }
-
- /**
- * Create a part association destroy command.
- *
- * @return the part association destroy command
- */
- @SuppressWarnings("unchecked")
- private ICommand getDestroyPartAssociationCommand(Association partAssociation, Property propertyToEdit) {
-
- DestroyElementRequest request = new DestroyElementRequest(partAssociation, false);
- List<EObject> dependentsToKeep = Arrays.asList(new EObject[] { propertyToEdit });
- request.getParameters().put(RequestParameterConstants.DEPENDENTS_TO_KEEP, dependentsToKeep);
-
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(partAssociation.eContainer());
- if(provider == null) {
- return null;
- }
- ICommand destroyCommand = provider.getEditCommand(request);
-
- return destroyCommand;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011-2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.service.types.helper.advice;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.EMFCoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.services.edit.utils.RequestParameterConstants;
+import org.eclipse.papyrus.sysml.constraints.ConstraintBlock;
+import org.eclipse.papyrus.sysml.constraints.ConstraintProperty;
+import org.eclipse.papyrus.sysml.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.sysml.service.types.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.sysml.service.types.utils.ConnectorUtils;
+import org.eclipse.papyrus.uml.diagram.common.util.CrossReferencerUtil;
+import org.eclipse.papyrus.uml.service.types.utils.ElementUtil;
+import org.eclipse.papyrus.uml.service.types.utils.NamedElementHelper;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Association;
+import org.eclipse.uml2.uml.Connector;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+/**
+ * <pre>
+ * This HelperAdvice completes {@link Property} edit commands with:
+ * - possibly required (sysML) association re-factor command.
+ * </pre>
+ */
+public class PropertyEditHelperAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ * <pre>
+ * {@inheritDoc}
+ *
+ * While setting {@link Property} (excluding {@link Port} and {@link ConstraintParameter} type:
+ * - add possibly required (sysML) association re-factor command when needed.
+ * - add/remove possibly required ConstraintProperty stereotype when needed.
+ * </pre>
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ protected ICommand getBeforeSetCommand(SetRequest request) {
+ ICommand gmfCommand = super.getBeforeSetCommand(request);
+
+ EObject elementToEdit = request.getElementToEdit();
+ if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (request.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (request.getValue() instanceof Type)) {
+
+ Property propertyToEdit = (Property)elementToEdit;
+
+ // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
+ if(request.getValue() instanceof org.eclipse.uml2.uml.Class) {
+ ICommand stereotypeApplicationCommand = getConstraintPropertyStereotypeApplicationCommand(propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue(), request);
+ gmfCommand = CompositeCommand.compose(gmfCommand, stereotypeApplicationCommand);
+ }
+
+ // Exclude ConstraintParameter (simple property without ConstraintProperty stereotype owned by a ConstraintBlock)
+ if(propertyToEdit.eContainer() instanceof org.eclipse.uml2.uml.Class && UMLUtil.getStereotypeApplication((Element)propertyToEdit.eContainer(), ConstraintBlock.class) != null) {
+ if(UMLUtil.getStereotypeApplication(propertyToEdit, ConstraintProperty.class) == null) {
+ return gmfCommand;
+ }
+ }
+
+ Association relatedAssociation = propertyToEdit.getAssociation();
+
+ // The edited property has to be related to a SysML association
+ if((relatedAssociation == null) || !(ElementUtil.hasNature(relatedAssociation, SysMLElementTypes.SYSML_NATURE))) {
+ // If no association exist and the new type is a Block
+ // (not a ConstraintBlock => a property typed by a ConstraintBlock is a ConstraintProperty, not a Part neither a Reference),
+ // add the association
+ if((relatedAssociation == null) && ((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches((Type)request.getValue()) && !((ISpecializationType)SysMLElementTypes.CONSTRAINT_BLOCK).getMatcher().matches((Type)request.getValue()) && ((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches(propertyToEdit.eContainer())) {
+ ICommand addAssociationCommand = getCreatePartAssociationCommand((org.eclipse.uml2.uml.Class)propertyToEdit.eContainer(), propertyToEdit, (org.eclipse.uml2.uml.Class)request.getValue());
+ gmfCommand = CompositeCommand.compose(gmfCommand, addAssociationCommand);
+ }
+ return gmfCommand;
+ }
+
+ // Setting new type can be related to an association re-orient (or trigger the association re-orient)
+ // Retrieve elements already under re-factor.
+ List<EObject> currentlyRefactoredElements = (request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) != null) ? (List<EObject>)request.getParameter(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS) : new ArrayList<EObject>();
+ if(!currentlyRefactoredElements.contains(propertyToEdit)) {
+ currentlyRefactoredElements.add(propertyToEdit);
+ request.getParameters().put(RequestParameterConstants.ASSOCIATION_REFACTORED_ELEMENTS, currentlyRefactoredElements);
+
+ // Current association already under re-factor ?
+ if(currentlyRefactoredElements.contains(relatedAssociation)) {
+ return gmfCommand;
+ }
+ }
+
+ // If the new type is not a block, destroy related association
+ // This must be done only if the setting of the property type is not part of an association re-orient (hence after the previous code-block),
+ // otherwise there is no legitimate reason to destroy the existing association while re-orienting it.
+ if(!((ISpecializationType)SysMLElementTypes.BLOCK).getMatcher().matches((Type)request.getValue()) && propertyToEdit.getType() != null) {
+ ICommand destroyCommand = getDestroyPartAssociationCommand(relatedAssociation, propertyToEdit);
+ gmfCommand = CompositeCommand.compose(gmfCommand, destroyCommand);
+ return gmfCommand;
+ }
+
+ ICommand refactorCommand = getAssociationRefactoringCommand(propertyToEdit, relatedAssociation, request);
+ gmfCommand = CompositeCommand.compose(gmfCommand, refactorCommand);
+ }
+
+ if(gmfCommand != null) {
+ gmfCommand = gmfCommand.reduce();
+ }
+
+ return gmfCommand;
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest)
+ *
+ * @param setRequest
+ * @return
+ */
+ @Override
+ protected ICommand getAfterSetCommand(SetRequest setRequest) {
+ ICommand afterSetCommand = super.getAfterSetCommand(setRequest);
+ EObject elementToEdit = setRequest.getElementToEdit();
+ if((elementToEdit instanceof Property) && !(elementToEdit instanceof Port) && (setRequest.getFeature() == UMLPackage.eINSTANCE.getTypedElement_Type()) && (setRequest.getValue() instanceof Type)) {
+ afterSetCommand = getDestroyAssociatedNestedConnectorCommand((Property)elementToEdit, afterSetCommand);
+ }
+ return afterSetCommand;
+ }
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
+ *
+ * @param destroyDependentsRequest
+ * @return
+ */
+ @Override
+ protected ICommand getAfterDestroyDependentsCommand(DestroyDependentsRequest destroyDependentsRequest) {
+ ICommand afterDestroyDependentsCommand = super.getAfterDestroyDependentsCommand(destroyDependentsRequest);
+ EObject elementToDestroy = destroyDependentsRequest.getElementToDestroy();
+ if(elementToDestroy instanceof Property) {
+ afterDestroyDependentsCommand = getDestroyAssociatedNestedConnectorCommand((Property)elementToDestroy, afterDestroyDependentsCommand);
+ }
+ return afterDestroyDependentsCommand;
+ }
+
+ /**
+ * Create a destroy command for all connectors that have this property in their <NestedConnectorEnd> property path.
+ *
+ * @param property
+ * the part to be destroyed
+ * @param command
+ * @return
+ */
+ private ICommand getDestroyAssociatedNestedConnectorCommand(Property property, ICommand command) {
+ List<Connector> instancesFilteredByType = org.eclipse.papyrus.uml.tools.utils.ElementUtil.getInstancesFilteredByType(property.getModel(), Connector.class, null);
+ List<Connector> connectorToDestroy = ConnectorUtils.filterConnectorByPropertyInNestedConnectorEnd(instancesFilteredByType, (Property)property);
+ for(Connector connector : connectorToDestroy) {
+ ICommand destroyConnectorCommand = getDestroyConnectorCommand(connector);
+ command = CompositeCommand.compose(command, destroyConnectorCommand);
+ }
+ return command;
+ }
+
+ /**
+ * Create a connector destroy command.
+ *
+ * @param connector
+ * @return the connector destroy command
+ */
+ private ICommand getDestroyConnectorCommand(Connector connector) {
+ DestroyElementRequest request = new DestroyElementRequest(connector, false);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(connector.eContainer());
+ if(provider == null) {
+ return null;
+ }
+ return provider.getEditCommand(request);
+ }
+
+ /**
+ * Create a re-factoring command related to a Property move.
+ *
+ * @param setProperty
+ * the property which type is set
+ * @param associationToRefactor
+ * the association to re-factor (re-orient action)
+ * @param request
+ * the original set request
+ * @return the re-factoring command
+ */
+ private ICommand getAssociationRefactoringCommand(Property setProperty, Association associationToRefactor, SetRequest request) {
+
+ Association relatedAssociation = setProperty.getAssociation(); // Should not be null, test before calling method.
+
+ if(associationToRefactor.getMemberEnds().size() >= 2) {
+ // Re-orient the related association (do not use edit service to avoid infinite loop here)
+ int direction = ReorientRelationshipRequest.REORIENT_TARGET;
+ if(setProperty == associationToRefactor.getMemberEnds().get(1)) {
+ direction = ReorientRelationshipRequest.REORIENT_SOURCE;
+ }
+ ReorientRelationshipRequest reorientRequest = new ReorientRelationshipRequest(relatedAssociation, (Type)request.getValue(), setProperty.eContainer(), direction);
+ reorientRequest.addParameters(request.getParameters());
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(relatedAssociation);
+ if(provider != null) {
+ return provider.getEditCommand(reorientRequest);
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Create a part association creation command.
+ *
+ * @return the part association creation command
+ */
+ private ICommand getCreatePartAssociationCommand(final org.eclipse.uml2.uml.Class sourceBlock, final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock) {
+ return new AbstractCommand("Create part association") {
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ Association association = UMLFactory.eINSTANCE.createAssociation();
+ // Add the association in the model
+ org.eclipse.uml2.uml.Package container = (org.eclipse.uml2.uml.Package)EMFCoreUtil.getLeastCommonContainer(Arrays.asList(new EObject[]{ sourceBlock, targetBlock }), UMLPackage.eINSTANCE.getPackage());
+ container.getPackagedElements().add(association);
+ // Use existing Property as source...
+ association.getMemberEnds().add(sourceProperty);
+ // ... and create the opposite (unnamed) Property
+ Property targetProperty = UMLFactory.eINSTANCE.createProperty();
+ association.getOwnedEnds().add(targetProperty);
+
+ // Set Association name
+ // Initialize the element name based on the created IElementType
+ String initializedName = NamedElementHelper.getDefaultNameWithIncrementFromBase(UMLPackage.eINSTANCE.getAssociation().getName(), association.eContainer().eContents());
+ association.setName(initializedName);
+ // Add SysML Nature on the new Association
+ ElementUtil.addNature(association, SysMLElementTypes.SYSML_NATURE);
+ return CommandResult.newOKCommandResult(association);
+ }
+ };
+
+ }
+
+ /**
+ * Apply/remove the ConstraintProperty stereotype application
+ *
+ * @return the ConstraintProperty stereotype application command
+ */
+ private ICommand getConstraintPropertyStereotypeApplicationCommand(final Property sourceProperty, final org.eclipse.uml2.uml.Class targetBlock, final SetRequest request) {
+ return new AbstractTransactionalCommand(request.getEditingDomain(), "Apply/Remove ConstraintProperty Stereotype", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // SysML specification : all property typed by a ConstraintBlock must have a ContraintProperty stereotype applied
+ ConstraintProperty constraintPropertyApplication = UMLUtil.getStereotypeApplication(sourceProperty, ConstraintProperty.class);
+ if(UMLUtil.getStereotypeApplication(targetBlock, ConstraintBlock.class) != null) {
+ if(constraintPropertyApplication == null) {
+ StereotypeApplicationHelper.INSTANCE.applyStereotype(sourceProperty, ConstraintsPackage.eINSTANCE.getConstraintProperty());
+ final String diagramType = null;
+ // Remove representations
+ Set<View> memberViewsToDestroy = CrossReferencerUtil.getCrossReferencingViews(sourceProperty, diagramType);
+ if(memberViewsToDestroy.size() != 0) {
+ final IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ final String DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY = "displayMessageForTypingActionPreferenceKey";
+ boolean contains = store.contains(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ if(!contains) {
+ store.setValue(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
+ store.setDefault(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY, MessageDialogWithToggle.NEVER);
+ }
+ final String hideValue = store.getString(DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ if(!hideValue.equals(MessageDialogWithToggle.ALWAYS)) {
+ int size = memberViewsToDestroy.size();
+ MessageDialogWithToggle.openInformation(Display.getDefault().getActiveShell(), "Change Type Action", "WARNING! Typing a Property by a ConstraintBlock make this property become a ConstraintProperty. ConstraintProperty have a specific representation. " + "\nSo all representations of this property will be removed from the model (" + size + " occurence" + ((size > 1) ? "s" : "") + ").", "Don't show this dialog the next time", false, store, DISPLAY_MESSAGE_FOR_TYPING_ACTION_PREFERENCE_KEY);
+ }
+ }
+ for(View view : memberViewsToDestroy) {
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(request.getEditingDomain(), view, false);
+ final IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(view);
+ ICommand editCommand = commandProvider.getEditCommand(destroyRequest);
+ editCommand.execute(progressMonitor, info);
+ }
+ }
+ } else {
+ if(constraintPropertyApplication != null) {
+ StereotypeApplicationHelper.INSTANCE.removeFromContainmentList(sourceProperty, constraintPropertyApplication);
+ }
+ }
+ return CommandResult.newOKCommandResult(sourceProperty);
+ }
+ };
+ }
+
+ /**
+ * Create a part association destroy command.
+ *
+ * @return the part association destroy command
+ */
+ @SuppressWarnings("unchecked")
+ private ICommand getDestroyPartAssociationCommand(Association partAssociation, Property propertyToEdit) {
+ DestroyElementRequest request = new DestroyElementRequest(partAssociation, false);
+ List<EObject> dependentsToKeep = Arrays.asList(new EObject[]{ propertyToEdit });
+ request.getParameters().put(RequestParameterConstants.DEPENDENTS_TO_KEEP, dependentsToKeep);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(partAssociation.eContainer());
+ if(provider == null) {
+ return null;
+ }
+ ICommand destroyCommand = provider.getEditCommand(request);
+ return destroyCommand;
+ }
+}
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
index d9d723e6e10..4033a75abbd 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml.service.types/src/org/eclipse/papyrus/sysml/service/types/utils/ConnectorUtils.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.sysml.blocks.Block;
@@ -428,4 +429,33 @@ public class ConnectorUtils extends org.eclipse.papyrus.uml.service.types.utils.
}
return true;
}
+
+
+
+ /**
+ * Filter connectors that have this property in their <NestedConnectorEnd> property path.
+ * @param connectors
+ * @param part
+ * @return connectors that have this property in their <NestedConnectorEnd> property path.
+ */
+ public static List<Connector> filterConnectorByPropertyInNestedConnectorEnd(List<Connector> connectors, Property part) {
+ List<Connector> res = new ArrayList<Connector>();
+ for(Connector connector : connectors) {
+ EList<ConnectorEnd> ends = connector.getEnds();
+ for(ConnectorEnd connectorEnd : ends) {
+ NestedConnectorEnd stereotypeApplication = UMLUtil.getStereotypeApplication(connectorEnd, NestedConnectorEnd.class);
+ if (stereotypeApplication != null){
+ EList<Property> propertyPath = stereotypeApplication.getPropertyPath();
+ for(Property property : propertyPath) {
+ if (property.equals(part)){
+ res.add(connector);
+ }
+ }
+ }
+ }
+ }
+ return res;
+ }
+
+
}
diff --git a/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java b/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java
index b432ffae4c9..b1d3bc81b46 100644
--- a/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java
+++ b/plugins/sysml/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/util/SysmlResource.java
@@ -1,213 +1,220 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.util;
-
-import org.eclipse.papyrus.sysml.SysmlPackage;
-
-public class SysmlResource {
-
- public static final String LIBRARIES_PATHMAP = "pathmap://SysML_LIBRARIES/"; //$NON-NLS-1$
-
- public static final String SYSML_PRIMITIVE_TYPES_LIBRARY_URI = LIBRARIES_PATHMAP + "SysMLPrimitiveTypes.uml"; //$NON-NLS-1$
-
- public static final String PROFILES_PATHMAP = "pathmap://SysML_PROFILES/"; //$NON-NLS-1$
-
- public static final String SYSML_PROFILE_NS_URI = SysmlPackage.eNS_URI;
-
- public static final String SYSML_PROFILE_URI = PROFILES_PATHMAP + "SysML.profile.uml"; //$NON-NLS-1$
-
- // Stereotypes ids
- @Deprecated
- public static String CONFORM_ID = "SysML::ModelElements::Conform";
-
- @Deprecated
- public static String VIEW_ID = "SysML::ModelElements::View";
-
- @Deprecated
- public static String VIEW_POINT_ID = "SysML::ModelElements::ViewPoint";
-
- /**
- * @deprecated use VIEW_POINT_ID instead
- */
- public static String VIEWPOINT_ID = VIEW_POINT_ID;
-
- @Deprecated
- public static String RATIONALE_ID = "SysML::ModelElements::Rationale";
-
- @Deprecated
- public static String PROBLEM_ID = "SysML::ModelElements::Problem";
-
- @Deprecated
- public static String BLOCK_ID = "SysML::Blocks::Block";
-
- @Deprecated
- public static String DISTRIBUTED_PROPERTY_ID = "SysML::Blocks::DistributedProperty";
-
- @Deprecated
- public static String DIMENSION_ID = "SysML::Blocks::Dimension";
-
- @Deprecated
- public static String UNIT_ID = "SysML::Blocks::Unit";
-
- @Deprecated
- public static String VALUE_TYPE_ID = "SysML::Blocks::ValueType";
-
- @Deprecated
- public static String NESTED_CONNECTOR_END_ID = "SysML::Blocks::NestedConnectorEnd";
-
- /** @deprecated use NESTED_CONNECTOR_END_ID instead */
- public static String NESTED_CONNECTOREND_ID = NESTED_CONNECTOR_END_ID;
-
- @Deprecated
- public static String PARTICIPANT_PROPERTY_ID = "SysML::Blocks::ParticipantProperty";
-
- @Deprecated
- public static String CONNECTOR_PROPERTY_ID = "SysML::Blocks::ConnectorProperty";
-
- @Deprecated
- public static String BINDING_CONNECTOR_ID = "SysML::Blocks::BindingConnector";
-
- @Deprecated
- public static String PROPERTY_SPECIFIC_TYPE_ID = "SysML::Blocks::PropertySpecificType";
-
- @Deprecated
- public static String FLOW_PORT_ID = "SysML::PortAndFlows::FlowPort";
-
- @Deprecated
- public static String FLOW_PROPERTY_ID = "SysML::PortAndFlows::FlowProperty";
-
- @Deprecated
- public static String FLOW_SPECIFICATION_ID = "SysML::PortAndFlows::FlowSpecification";
-
- @Deprecated
- public static String ITEM_FLOW_ID = "SysML::PortAndFlows::ItemFlow";
-
- @Deprecated
- public static String CONSTRAINT_BLOCK_ID = "SysML::Constraints::ConstraintBlock";
-
- @Deprecated
- public static String CONSTRAINT_PROPERTY_ID = "SysML::Constraints::ConstraintProperty";
-
- @Deprecated
- public static String OPTIONAL_ID = "SysML::Activities::Optional";
-
- @Deprecated
- public static String RATE_ID = "SysML::Activities::Rate";
-
- @Deprecated
- public static String PROBABILITY_ID = "SysML::Activities::Probability";
-
- @Deprecated
- public static String CONTINUOUS_ID = "SysML::Activities::Continuous";
-
- @Deprecated
- public static String DISCRETE_ID = "SysML::Activities::Discrete";
-
- @Deprecated
- public static String CONTROL_OPERATOR_ID = "SysML::Activities::ControlOperator";
-
- @Deprecated
- public static String NO_BUFFER_ID = "SysML::Activities::NoBuffer";
-
- @Deprecated
- public static String OVERWRITE_ID = "SysML::Activities::Overwrite";
-
- @Deprecated
- public static String ALLOCATE_ID = "SysML::Allocations::Allocate";
-
- @Deprecated
- public static String ALLOCATED_ID = "SysML::Allocations::Allocated";
-
- @Deprecated
- public static String ALLOCATE_ACTIVITY_PARTITION_ID = "SysML::Allocations::AllocateActivityPartition";
-
- @Deprecated
- public static String DERIVE_REQT_ID = "SysML::Requirements::DeriveReqt";
-
- @Deprecated
- public static String VERIFY_ID = "SysML::Requirements::Verify";
-
- @Deprecated
- public static String COPY_ID = "SysML::Requirements::Copy";
-
- @Deprecated
- public static String SATISFY_ID = "SysML::Requirements::Satisfy";
-
- @Deprecated
- public static String TEST_CASE_ID = "SysML::Requirements::TestCase";
-
- @Deprecated
- public static String REQUIREMENT_ID = "SysML::Requirements::Requirement";
-
- @Deprecated
- public static String REQUIREMENT_RELATED_ID = "SysML::Requirements::RequirementRelated";
-
- // SubProfiles ids
- @Deprecated
- public static String SYSML_ID = "SysML";
-
- @Deprecated
- public static String MODEL_ELEMENTS_ID = "SysML::ModelElements";
-
- @Deprecated
- public static String BLOCKS_ID = "SysML::Blocks";
-
- @Deprecated
- public static String PORT_AND_FLOWS_ID = "SysML::PortAndFlows";
-
- @Deprecated
- public static String CONSTRAINTS_ID = "SysML::Constraints";
-
- @Deprecated
- public static String ACTIVITIES_ID = "SysML::Activities";
-
- @Deprecated
- public static String ALLOCATIONS_ID = "SysML::Allocations";
-
- @Deprecated
- public static String REQUIREMENTS_ID = "SysML::Requirements";
-
- // stereotype properties ids
- // requirements properties
- @Deprecated
- public static String REQUIREMENT_BASE_CLASS_ID = "base_Class"; //$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_DERIVED_ID = "derived"; //$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_DERIVED_FROM_ID = "derivedFrom";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_ID_ID = "id";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_MASTER_ID = "master";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_REFINED_BY_ID = "refinedBy";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_SATISFIED_BY_ID = "satisfiedBy";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_TEXT_ID = "text";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_TRACED_TO_ID = "tracedTo";//$NON-NLS-1$
-
- @Deprecated
- public static String REQUIREMENT_VERIFIED_BY_ID = "verifiedBy";//$NON-NLS-1$
-
-}
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - Initial API and implementation
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.util;
+
+import org.eclipse.papyrus.sysml.SysmlPackage;
+
+/**
+ * For all deprecated : use org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication
+ * Ex :
+ * replace appliedStereotype = connectorEnd.getAppliedStereotype("SysML::Blocks::NestedConnectorEnd");connectorEnd.getStereotypeApplication(appliedStereotype);
+ * by org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication(element, NestedConnectorEnd.class);
+ */
+public class SysmlResource {
+
+ public static final String LIBRARIES_PATHMAP = "pathmap://SysML_LIBRARIES/"; //$NON-NLS-1$
+
+ public static final String SYSML_PRIMITIVE_TYPES_LIBRARY_URI = LIBRARIES_PATHMAP + "SysMLPrimitiveTypes.uml"; //$NON-NLS-1$
+
+ public static final String PROFILES_PATHMAP = "pathmap://SysML_PROFILES/"; //$NON-NLS-1$
+
+ public static final String SYSML_PROFILE_NS_URI = SysmlPackage.eNS_URI;
+
+ public static final String SYSML_PROFILE_URI = PROFILES_PATHMAP + "SysML.profile.uml"; //$NON-NLS-1$
+
+
+ // Stereotypes ids
+ @Deprecated
+ public static String CONFORM_ID = "SysML::ModelElements::Conform";
+
+ @Deprecated
+ public static String VIEW_ID = "SysML::ModelElements::View";
+
+ @Deprecated
+ public static String VIEW_POINT_ID = "SysML::ModelElements::ViewPoint";
+
+ /**
+ * @deprecated use VIEW_POINT_ID instead
+ */
+ public static String VIEWPOINT_ID = VIEW_POINT_ID;
+
+ @Deprecated
+ public static String RATIONALE_ID = "SysML::ModelElements::Rationale";
+
+ @Deprecated
+ public static String PROBLEM_ID = "SysML::ModelElements::Problem";
+
+ @Deprecated
+ public static String BLOCK_ID = "SysML::Blocks::Block";
+
+ @Deprecated
+ public static String DISTRIBUTED_PROPERTY_ID = "SysML::Blocks::DistributedProperty";
+
+ @Deprecated
+ public static String DIMENSION_ID = "SysML::Blocks::Dimension";
+
+ @Deprecated
+ public static String UNIT_ID = "SysML::Blocks::Unit";
+
+ @Deprecated
+ public static String VALUE_TYPE_ID = "SysML::Blocks::ValueType";
+
+ @Deprecated
+ public static String NESTED_CONNECTOR_END_ID = "SysML::Blocks::NestedConnectorEnd";
+
+ /** @deprecated use NESTED_CONNECTOR_END_ID instead */
+ public static String NESTED_CONNECTOREND_ID = NESTED_CONNECTOR_END_ID;
+
+ @Deprecated
+ public static String PARTICIPANT_PROPERTY_ID = "SysML::Blocks::ParticipantProperty";
+
+ @Deprecated
+ public static String CONNECTOR_PROPERTY_ID = "SysML::Blocks::ConnectorProperty";
+
+ @Deprecated
+ public static String BINDING_CONNECTOR_ID = "SysML::Blocks::BindingConnector";
+
+ @Deprecated
+ public static String PROPERTY_SPECIFIC_TYPE_ID = "SysML::Blocks::PropertySpecificType";
+
+ @Deprecated
+ public static String FLOW_PORT_ID = "SysML::PortAndFlows::FlowPort";
+
+ @Deprecated
+ public static String FLOW_PROPERTY_ID = "SysML::PortAndFlows::FlowProperty";
+
+ @Deprecated
+ public static String FLOW_SPECIFICATION_ID = "SysML::PortAndFlows::FlowSpecification";
+
+ @Deprecated
+ public static String ITEM_FLOW_ID = "SysML::PortAndFlows::ItemFlow";
+
+ @Deprecated
+ public static String CONSTRAINT_BLOCK_ID = "SysML::Constraints::ConstraintBlock";
+
+ @Deprecated
+ public static String CONSTRAINT_PROPERTY_ID = "SysML::Constraints::ConstraintProperty";
+
+ @Deprecated
+ public static String OPTIONAL_ID = "SysML::Activities::Optional";
+
+ @Deprecated
+ public static String RATE_ID = "SysML::Activities::Rate";
+
+ @Deprecated
+ public static String PROBABILITY_ID = "SysML::Activities::Probability";
+
+ @Deprecated
+ public static String CONTINUOUS_ID = "SysML::Activities::Continuous";
+
+ @Deprecated
+ public static String DISCRETE_ID = "SysML::Activities::Discrete";
+
+ @Deprecated
+ public static String CONTROL_OPERATOR_ID = "SysML::Activities::ControlOperator";
+
+ @Deprecated
+ public static String NO_BUFFER_ID = "SysML::Activities::NoBuffer";
+
+ @Deprecated
+ public static String OVERWRITE_ID = "SysML::Activities::Overwrite";
+
+ @Deprecated
+ public static String ALLOCATE_ID = "SysML::Allocations::Allocate";
+
+ @Deprecated
+ public static String ALLOCATED_ID = "SysML::Allocations::Allocated";
+
+ @Deprecated
+ public static String ALLOCATE_ACTIVITY_PARTITION_ID = "SysML::Allocations::AllocateActivityPartition";
+
+ @Deprecated
+ public static String DERIVE_REQT_ID = "SysML::Requirements::DeriveReqt";
+
+ @Deprecated
+ public static String VERIFY_ID = "SysML::Requirements::Verify";
+
+ @Deprecated
+ public static String COPY_ID = "SysML::Requirements::Copy";
+
+ @Deprecated
+ public static String SATISFY_ID = "SysML::Requirements::Satisfy";
+
+ @Deprecated
+ public static String TEST_CASE_ID = "SysML::Requirements::TestCase";
+
+ @Deprecated
+ public static String REQUIREMENT_ID = "SysML::Requirements::Requirement";
+
+ @Deprecated
+ public static String REQUIREMENT_RELATED_ID = "SysML::Requirements::RequirementRelated";
+
+ // SubProfiles ids
+ @Deprecated
+ public static String SYSML_ID = "SysML";
+
+ @Deprecated
+ public static String MODEL_ELEMENTS_ID = "SysML::ModelElements";
+
+ @Deprecated
+ public static String BLOCKS_ID = "SysML::Blocks";
+
+ @Deprecated
+ public static String PORT_AND_FLOWS_ID = "SysML::PortAndFlows";
+
+ @Deprecated
+ public static String CONSTRAINTS_ID = "SysML::Constraints";
+
+ @Deprecated
+ public static String ACTIVITIES_ID = "SysML::Activities";
+
+ @Deprecated
+ public static String ALLOCATIONS_ID = "SysML::Allocations";
+
+ @Deprecated
+ public static String REQUIREMENTS_ID = "SysML::Requirements";
+
+ // stereotype properties ids
+ // requirements properties
+ @Deprecated
+ public static String REQUIREMENT_BASE_CLASS_ID = "base_Class"; //$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_DERIVED_ID = "derived"; //$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_DERIVED_FROM_ID = "derivedFrom";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_ID_ID = "id";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_MASTER_ID = "master";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_REFINED_BY_ID = "refinedBy";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_SATISFIED_BY_ID = "satisfiedBy";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_TEXT_ID = "text";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_TRACED_TO_ID = "tracedTo";//$NON-NLS-1$
+
+ @Deprecated
+ public static String REQUIREMENT_VERIFIED_BY_ID = "verifiedBy";//$NON-NLS-1$
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderNodeEditPart.java
index 05e05763d54..6960e7966f6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderNodeEditPart.java
@@ -200,6 +200,6 @@ public abstract class BorderNodeEditPart extends BorderedBorderItemEditPart impl
*/
@Override
public DragTracker getDragTracker(final Request request) {
- return new PapyrusDragBorderNodeEditPartTrackerEx(this, false, true, true);
+ return new PapyrusDragBorderNodeEditPartTrackerEx(this);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/.project b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/.project
index 2fea61050c1..92110db9485 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/.project
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.diagram.uml.diagram.paletteconfiguration.edit</name>
+ <name>org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
index bd8158de07f..3c533af22db 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/META-INF/MANIFEST.MF
@@ -1,27 +1,20 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration.e
- dit.provider
+Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.paletteconfiguration;bundle-version="0.10.2";visibility:=reexport,
+ org.eclipse.papyrus.uml.diagram.paletteconfiguration;visibility:=reexport;bundle-version="0.10.2",
org.eclipse.emf.edit;visibility:=reexport,
- org.eclipse.papyrus.infra.queries.core.configuration;bundle-version="0.10.2";visibility:=reexport,
- org.eclipse.papyrus.infra.queries.core.configuration.edit;bundle-version="0.10.2";visibility:=reexport,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.emf.facet.infra.query;visibility:=reexport,
- org.eclipse.emf.facet.infra.query.edit;visibility:=reexport,
org.eclipse.uml2.uml,
org.eclipse.uml2.uml.edit
Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: .
Bundle-Version: 0.10.2.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration
- .edit.provider.PaletteConfigurationEditPlugin$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfigurat
- ion.edit;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteConfigurationEditPlugin$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit;singleton:=true
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/plugin.xml
index 4736333c617..bd733411ed5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/plugin.xml
@@ -11,9 +11,10 @@
<plugin>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
+ <!-- @generated PaletteConfiguration -->
<factory
uri="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
- class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider.PaletteconfigurationItemProviderAdapterFactory"
+ class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteconfigurationItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ChildConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java
index 0b93638f031..34f0d3b7a9c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ChildConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ChildConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,12 +8,14 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ChildConfiguration;
/**
@@ -72,6 +70,7 @@ public class ChildConfigurationItemProvider
getString("_UI_ChildConfiguration_type") :
getString("_UI_ChildConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java
index cc61c40f1c9..781144360e0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,8 +8,11 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -24,6 +23,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.Configuration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -179,6 +179,7 @@ public class ConfigurationItemProvider
getString("_UI_Configuration_type") :
getString("_UI_Configuration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java
index 62140c30bd1..671b9acf667 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/DrawerConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/DrawerConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -20,6 +18,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.DrawerConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -117,6 +116,7 @@ public class DrawerConfigurationItemProvider
getString("_UI_DrawerConfiguration_type") :
getString("_UI_DrawerConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java
index 5b18663e04b..1e0b98ec2f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ElementDescriptorItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ElementDescriptorItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -23,6 +21,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ElementDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -135,6 +134,7 @@ public class ElementDescriptorItemProvider
getString("_UI_ElementDescriptor_type") :
getString("_UI_ElementDescriptor_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java
index fc20d3aaaf6..c85c61740e9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/IconDescriptorItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/IconDescriptorItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -23,6 +21,7 @@ import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.IconDescriptor;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -135,6 +134,7 @@ public class IconDescriptorItemProvider
getString("_UI_IconDescriptor_type") :
getString("_UI_IconDescriptor_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java
index 911fbec96a7..b8614a33ee9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/LeafConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/LeafConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,12 +8,14 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.LeafConfiguration;
/**
@@ -72,6 +70,7 @@ public class LeafConfigurationItemProvider
getString("_UI_LeafConfiguration_type") :
getString("_UI_LeafConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
index a63daeb7400..8b00d61b41d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationEditPlugin.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationEditPlugin.java
@@ -1,17 +1,12 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import org.eclipse.emf.common.EMFPlugin;
+
import org.eclipse.emf.common.util.ResourceLocator;
+
import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
-import org.eclipse.emf.facet.infra.query.edit.provider.QueryEditPlugin;
-import org.eclipse.papyrus.infra.queries.core.configuration.provider.ConfigurationEditPlugin;
-import org.eclipse.uml2.uml.edit.UMLEditPlugin;
/**
* This is the central singleton for the PaletteConfiguration edit plugin.
@@ -45,10 +40,7 @@ public final class PaletteConfigurationEditPlugin extends EMFPlugin {
public PaletteConfigurationEditPlugin() {
super
(new ResourceLocator [] {
- ConfigurationEditPlugin.INSTANCE,
EcoreEditPlugin.INSTANCE,
- QueryEditPlugin.INSTANCE,
- UMLEditPlugin.INSTANCE,
});
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java
index 1a58a13701d..865a691f6de 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -20,6 +18,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteConfiguration;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
@@ -117,6 +116,7 @@ public class PaletteConfigurationItemProvider
getString("_UI_PaletteConfiguration_type") :
getString("_UI_PaletteConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java
index 0ecb8636ea8..670952410dc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/PaletteconfigurationItemProviderAdapterFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/PaletteconfigurationItemProviderAdapterFactory.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.ArrayList;
import java.util.Collection;
@@ -12,6 +8,7 @@ import java.util.Collection;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
+
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
@@ -23,6 +20,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationAdapterFactory;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java
index f8b5d2eecbf..ecebb1866f4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/SeparatorConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/SeparatorConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,12 +8,14 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.SeparatorConfiguration;
/**
@@ -83,6 +81,7 @@ public class SeparatorConfigurationItemProvider
getString("_UI_SeparatorConfiguration_type") :
getString("_UI_SeparatorConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java
index 08a699eb8d5..e17089de8fb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/StackConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/StackConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
@@ -20,6 +18,7 @@ import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.StackConfiguration;
@@ -117,6 +116,7 @@ public class StackConfigurationItemProvider
getString("_UI_StackConfiguration_type") :
getString("_UI_StackConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java
index 69f16efc273..18c5e5cca0c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/edit/provider/ToolConfigurationItemProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ToolConfigurationItemProvider.java
@@ -1,10 +1,6 @@
/**
- * <copyright>
- * </copyright>
- *
- * $Id$
*/
-package org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit.provider;
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider;
import java.util.Collection;
@@ -12,7 +8,9 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+
import org.eclipse.emf.ecore.EStructuralFeature;
+
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -22,6 +20,7 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
import org.eclipse.papyrus.uml.diagram.paletteconfiguration.ToolConfiguration;
@@ -61,35 +60,12 @@ public class ToolConfigurationItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addPreValidationQueryPropertyDescriptor(object);
addKindPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Pre Validation Query feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addPreValidationQueryPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ToolConfiguration_preValidationQuery_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ToolConfiguration_preValidationQuery_feature", "_UI_ToolConfiguration_type"),
- PaletteconfigurationPackage.Literals.TOOL_CONFIGURATION__PRE_VALIDATION_QUERY,
- true,
- false,
- true,
- null,
- null,
- null));
- }
-
- /**
* This adds a property descriptor for the Kind feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -165,6 +141,7 @@ public class ToolConfigurationItemProvider
getString("_UI_ToolConfiguration_type") :
getString("_UI_ToolConfiguration_type") + " " + label;
}
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.classpath b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project
new file mode 100644
index 00000000000..30f7f75d44f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..0979acc994d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor;singleton:=true
+Bundle-Version: 0.10.1.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteConfigurationEditorPlugin$Implementation
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.emf.edit.ui;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport,
+ org.eclipse.emf.ecore.edit;visibility:=reexport
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/build.properties
new file mode 100644
index 00000000000..5be0bb24b0e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/build.properties
@@ -0,0 +1,10 @@
+#
+
+bin.includes = .,\
+ icons/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/obj16/PaletteconfigurationModelFile.gif b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/obj16/PaletteconfigurationModelFile.gif
new file mode 100644
index 00000000000..80c152ab6b4
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/obj16/PaletteconfigurationModelFile.gif
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/wizban/NewPaletteconfiguration.gif b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/wizban/NewPaletteconfiguration.gif
new file mode 100644
index 00000000000..e85f1da21d9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/icons/full/wizban/NewPaletteconfiguration.gif
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.properties
new file mode 100644
index 00000000000..33d36de6ea7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.properties
@@ -0,0 +1,53 @@
+#
+
+pluginName = PaletteConfiguration Editor
+providerName = www.example.org
+
+_UI_PaletteconfigurationEditor_menu = &Paletteconfiguration Editor
+
+_UI_CreateChild_menu_item = &New Child
+_UI_CreateSibling_menu_item = N&ew Sibling
+
+_UI_ShowPropertiesView_menu_item = Show &Properties View
+_UI_RefreshViewer_menu_item = &Refresh
+
+_UI_SelectionPage_label = Selection
+_UI_ParentPage_label = Parent
+_UI_ListPage_label = List
+_UI_TreePage_label = Tree
+_UI_TablePage_label = Table
+_UI_TreeWithColumnsPage_label = Tree with Columns
+_UI_ObjectColumn_label = Object
+_UI_SelfColumn_label = Self
+
+_UI_NoObjectSelected = Selected Nothing
+_UI_SingleObjectSelected = Selected Object: {0}
+_UI_MultiObjectSelected = Selected {0} Objects
+
+_UI_OpenEditorError_label = Open Editor
+
+_UI_Wizard_category = Example EMF Model Creation Wizards
+
+_UI_CreateModelError_message = Problems encountered in file "{0}"
+
+_UI_PaletteconfigurationModelWizard_label = Paletteconfiguration Model
+_UI_PaletteconfigurationModelWizard_description = Create a new Paletteconfiguration model
+
+_UI_PaletteconfigurationEditor_label = Paletteconfiguration Model Editor
+
+_UI_PaletteconfigurationEditorFilenameDefaultBase = My
+_UI_PaletteconfigurationEditorFilenameExtensions = paletteconfiguration
+
+_UI_Wizard_label = New
+
+_WARN_FilenameExtension = The file name must end in ''.{0}''
+_WARN_FilenameExtensions = The file name must have one of the following extensions: {0}
+
+_UI_ModelObject = &Model Object
+_UI_XMLEncoding = &XML Encoding
+_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1
+_UI_Wizard_initial_object_description = Select a model object to create
+
+_UI_FileConflict_label = File Conflict
+_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes?
+
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.xml
new file mode 100644
index 00000000000..dcad8a33620
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/plugin.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <!-- @generated PaletteConfiguration -->
+ <category
+ id="org.eclipse.emf.ecore.Wizard.category.ID"
+ name="%_UI_Wizard_category"/>
+ <wizard
+ id="org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteconfigurationModelWizardID"
+ name="%_UI_PaletteconfigurationModelWizard_label"
+ class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteconfigurationModelWizard"
+ category="org.eclipse.emf.ecore.Wizard.category.ID"
+ icon="icons/full/obj16/PaletteconfigurationModelFile.gif">
+ <description>%_UI_PaletteconfigurationModelWizard_description</description>
+ <selection class="org.eclipse.core.resources.IResource"/>
+ </wizard>
+ </extension>
+
+ <extension point="org.eclipse.ui.editors">
+ <!-- @generated PaletteConfiguration -->
+ <editor
+ id="org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteconfigurationEditorID"
+ name="%_UI_PaletteconfigurationEditor_label"
+ icon="icons/full/obj16/PaletteconfigurationModelFile.gif"
+ extensions="paletteconfiguration"
+ class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteconfigurationEditor"
+ contributorClass="org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation.PaletteconfigurationActionBarContributor">
+ </editor>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java
new file mode 100644
index 00000000000..bac712a4629
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteConfigurationEditorPlugin.java
@@ -0,0 +1,94 @@
+/**
+ */
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.ui.EclipseUIPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.provider.EcoreEditPlugin;
+
+/**
+ * This is the central singleton for the PaletteConfiguration editor plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class PaletteConfigurationEditorPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final PaletteConfigurationEditorPlugin INSTANCE = new PaletteConfigurationEditorPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteConfigurationEditorPlugin() {
+ super
+ (new ResourceLocator [] {
+ EcoreEditPlugin.INSTANCE,
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipseUIPlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationActionBarContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationActionBarContributor.java
new file mode 100644
index 00000000000..b25f88b444b
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationActionBarContributor.java
@@ -0,0 +1,423 @@
+/**
+ */
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CreateChildAction;
+import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.ValidateAction;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.ActionContributionItem;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.action.SubContributionItem;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+
+/**
+ * This is the action bar contributor for the Paletteconfiguration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteconfigurationActionBarContributor
+ extends EditingDomainActionBarContributor
+ implements ISelectionChangedListener {
+ /**
+ * This keeps track of the active editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IEditorPart activeEditorPart;
+
+ /**
+ * This keeps track of the current selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionProvider selectionProvider;
+
+ /**
+ * This action opens the Properties view.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction showPropertiesViewAction =
+ new Action(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ }
+ catch (PartInitException exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * This action refreshes the viewer of the current editor if the editor
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IAction refreshViewerAction =
+ new Action(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
+
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
+ }
+ }
+ }
+ };
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createChildActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateChild actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createChildMenuManager;
+
+ /**
+ * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
+ * generated for the current selection by the item provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> createSiblingActions;
+
+ /**
+ * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IMenuManager createSiblingMenuManager;
+
+ /**
+ * This creates an instance of the contributor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteconfigurationActionBarContributor() {
+ super(ADDITIONS_LAST_STYLE);
+ loadResourceAction = new LoadResourceAction();
+ validateAction = new ValidateAction();
+ controlAction = new ControlAction();
+ }
+
+ /**
+ * This adds Separators for editor additions to the tool bar.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToToolBar(IToolBarManager toolBarManager) {
+ toolBarManager.add(new Separator("paletteconfiguration-settings"));
+ toolBarManager.add(new Separator("paletteconfiguration-additions"));
+ }
+
+ /**
+ * This adds to the menu bar a menu and some separators for editor additions,
+ * as well as the sub-menus for object creation items.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void contributeToMenu(IMenuManager menuManager) {
+ super.contributeToMenu(menuManager);
+
+ IMenuManager submenuManager = new MenuManager(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationEditor_menu"), "org.eclipse.papyrus.uml.diagram.paletteconfigurationMenuID");
+ menuManager.insertAfter("additions", submenuManager);
+ submenuManager.add(new Separator("settings"));
+ submenuManager.add(new Separator("actions"));
+ submenuManager.add(new Separator("additions"));
+ submenuManager.add(new Separator("additions-end"));
+
+ // Prepare for CreateChild item addition or removal.
+ //
+ createChildMenuManager = new MenuManager(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ submenuManager.insertBefore("additions", createChildMenuManager);
+
+ // Prepare for CreateSibling item addition or removal.
+ //
+ createSiblingMenuManager = new MenuManager(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ submenuManager.insertBefore("additions", createSiblingMenuManager);
+
+ // Force an update because Eclipse hides empty menus now.
+ //
+ submenuManager.addMenuListener
+ (new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
+
+ addGlobalActions(submenuManager);
+ }
+
+ /**
+ * When the active editor changes, this remembers the change and registers with it as a selection provider.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setActiveEditor(IEditorPart part) {
+ super.setActiveEditor(part);
+ activeEditorPart = part;
+
+ // Switch to the new selection provider.
+ //
+ if (selectionProvider != null) {
+ selectionProvider.removeSelectionChangedListener(this);
+ }
+ if (part == null) {
+ selectionProvider = null;
+ }
+ else {
+ selectionProvider = part.getSite().getSelectionProvider();
+ selectionProvider.addSelectionChangedListener(this);
+
+ // Fake a selection changed event to update the menus.
+ //
+ if (selectionProvider.getSelection() != null) {
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ }
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
+ * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
+ * that can be added to the selected object and updating the menus accordingly.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void selectionChanged(SelectionChangedEvent event) {
+ // Remove any menu items for old selection.
+ //
+ if (createChildMenuManager != null) {
+ depopulateManager(createChildMenuManager, createChildActions);
+ }
+ if (createSiblingMenuManager != null) {
+ depopulateManager(createSiblingMenuManager, createSiblingActions);
+ }
+
+ // Query the new selection for appropriate new child/sibling descriptors
+ //
+ Collection<?> newChildDescriptors = null;
+ Collection<?> newSiblingDescriptors = null;
+
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+
+ EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+
+ newChildDescriptors = domain.getNewChildDescriptors(object, null);
+ newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+ }
+
+ // Generate actions for selection; populate and redraw the menus.
+ //
+ createChildActions = generateCreateChildActions(newChildDescriptors, selection);
+ createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+
+ if (createChildMenuManager != null) {
+ populateManager(createChildMenuManager, createChildActions, null);
+ createChildMenuManager.update(true);
+ }
+ if (createSiblingMenuManager != null) {
+ populateManager(createSiblingMenuManager, createSiblingActions, null);
+ createSiblingMenuManager.update(true);
+ }
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
+ * and returns the collection of these actions.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ Collection<IAction> actions = new ArrayList<IAction>();
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
+ actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
+ }
+ }
+ return actions;
+ }
+
+ /**
+ * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
+ * by inserting them before the specified contribution item <code>contributionID</code>.
+ * If <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
+ manager.insertBefore(contributionID, action);
+ }
+ else {
+ manager.add(action);
+ }
+ }
+ }
+ }
+
+ /**
+ * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
+ * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ if (actions != null) {
+ IContributionItem[] items = manager.getItems();
+ for (int i = 0; i < items.length; i++) {
+ // Look into SubContributionItems
+ //
+ IContributionItem contributionItem = items[i];
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ }
+
+ // Delete the ActionContributionItems with matching action.
+ //
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem)contributionItem).getAction();
+ if (actions.contains(action)) {
+ manager.remove(contributionItem);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This populates the pop-up menu before it appears.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void menuAboutToShow(IMenuManager menuManager) {
+ super.menuAboutToShow(menuManager);
+ MenuManager submenuManager = null;
+
+ submenuManager = new MenuManager(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
+ populateManager(submenuManager, createChildActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+
+ submenuManager = new MenuManager(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
+ populateManager(submenuManager, createSiblingActions, null);
+ menuManager.insertBefore("edit", submenuManager);
+ }
+
+ /**
+ * This inserts global actions before the "additions-end" separator.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void addGlobalActions(IMenuManager menuManager) {
+ menuManager.insertAfter("additions-end", new Separator("ui-actions"));
+ menuManager.insertAfter("ui-actions", showPropertiesViewAction);
+
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ menuManager.insertAfter("ui-actions", refreshViewerAction);
+
+ super.addGlobalActions(menuManager);
+ }
+
+ /**
+ * This ensures that a delete action will clean up all references to deleted objects.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean removeAllReferencesOnDelete() {
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationEditor.java
new file mode 100644
index 00000000000..9a85b8195ef
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationEditor.java
@@ -0,0 +1,1821 @@
+/**
+ */
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation;
+
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+
+import org.eclipse.jface.util.LocalSelectionTransfer;
+
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.ListViewer;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.custom.CTabFolder;
+
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+
+import org.eclipse.swt.graphics.Point;
+
+import org.eclipse.swt.layout.FillLayout;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeColumn;
+
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
+
+import org.eclipse.ui.dialogs.SaveAsDialog;
+
+import org.eclipse.ui.ide.IGotoMarker;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.MultiPageEditorPart;
+
+import org.eclipse.ui.views.contentoutline.ContentOutline;
+import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
+import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
+
+import org.eclipse.ui.views.properties.IPropertySheetPage;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertySheetPage;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.ui.MarkerHelper;
+import org.eclipse.emf.common.ui.ViewerPane;
+
+import org.eclipse.emf.common.ui.editor.ProblemEditorPart;
+
+import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.URI;
+
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+
+import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+
+import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
+
+import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor;
+
+import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter;
+import org.eclipse.emf.edit.ui.dnd.LocalTransfer;
+import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter;
+
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider;
+
+import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper;
+import org.eclipse.emf.edit.ui.util.EditUIUtil;
+
+import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage;
+
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteconfigurationItemProviderAdapterFactory;
+
+import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+
+/**
+ * This is an example of a Paletteconfiguration model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteconfigurationEditor
+ extends MultiPageEditorPart
+ implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker {
+ /**
+ * This keeps track of the editing domain that is used to track all changes to the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AdapterFactoryEditingDomain editingDomain;
+
+ /**
+ * This is the one adapter factory used for providing views of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory adapterFactory;
+
+ /**
+ * This is the content outline page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IContentOutlinePage contentOutlinePage;
+
+ /**
+ * This is a kludge...
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStatusLineManager contentOutlineStatusLineManager;
+
+ /**
+ * This is the content outline page's viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer contentOutlineViewer;
+
+ /**
+ * This is the property sheet page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<PropertySheetPage> propertySheetPages = new ArrayList<PropertySheetPage>();
+
+ /**
+ * This is the viewer that shadows the selection in the content outline.
+ * The parent relation must be correctly defined for this to work.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer selectionViewer;
+
+ /**
+ * This inverts the roll of parent and child in the content provider and show parents as a tree.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer parentViewer;
+
+ /**
+ * This shows how a tree view works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewer;
+
+ /**
+ * This shows how a list view works.
+ * A list viewer doesn't support icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ListViewer listViewer;
+
+ /**
+ * This shows how a table view works.
+ * A table can be used as a list with icons.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TableViewer tableViewer;
+
+ /**
+ * This shows how a tree view with columns works.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeViewer treeViewerWithColumns;
+
+ /**
+ * This keeps track of the active viewer pane, in the book.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ViewerPane currentViewerPane;
+
+ /**
+ * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Viewer currentViewer;
+
+ /**
+ * This listens to which ever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelectionChangedListener selectionChangedListener;
+
+ /**
+ * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<ISelectionChangedListener> selectionChangedListeners = new ArrayList<ISelectionChangedListener>();
+
+ /**
+ * This keeps track of the selection of the editor as a whole.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ISelection editorSelection = StructuredSelection.EMPTY;
+
+ /**
+ * The MarkerHelper is responsible for creating workspace resource markers presented
+ * in Eclipse's Problems View.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MarkerHelper markerHelper = new EditUIMarkerHelper();
+
+ /**
+ * This listens for when the outline becomes active
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IPartListener partListener =
+ new IPartListener() {
+ public void partActivated(IWorkbenchPart p) {
+ if (p instanceof ContentOutline) {
+ if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
+ getActionBarContributor().setActiveEditor(PaletteconfigurationEditor.this);
+
+ setCurrentViewer(contentOutlineViewer);
+ }
+ }
+ else if (p instanceof PropertySheet) {
+ if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
+ getActionBarContributor().setActiveEditor(PaletteconfigurationEditor.this);
+ handleActivate();
+ }
+ }
+ else if (p == PaletteconfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+ public void partBroughtToTop(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partClosed(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partDeactivated(IWorkbenchPart p) {
+ // Ignore.
+ }
+ public void partOpened(IWorkbenchPart p) {
+ // Ignore.
+ }
+ };
+
+ /**
+ * Resources that have been removed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been changed since last activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+
+ /**
+ * Resources that have been saved.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Resource> savedResources = new ArrayList<Resource>();
+
+ /**
+ * Map to store the diagnostic associated with a resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
+
+ /**
+ * Controls whether the problem indication should be updated.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean updateProblemIndication = true;
+
+ /**
+ * Adapter used to update the problem indication when resources are demanded loaded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EContentAdapter problemIndicationAdapter =
+ new EContentAdapter() {
+ @Override
+ public void notifyChanged(Notification notification) {
+ if (notification.getNotifier() instanceof Resource) {
+ switch (notification.getFeatureID(Resource.class)) {
+ case Resource.RESOURCE__IS_LOADED:
+ case Resource.RESOURCE__ERRORS:
+ case Resource.RESOURCE__WARNINGS: {
+ Resource resource = (Resource)notification.getNotifier();
+ Diagnostic diagnostic = analyzeResourceProblems(resource, null);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, diagnostic);
+ }
+ else {
+ resourceToDiagnosticMap.remove(resource);
+ }
+
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ break;
+ }
+ }
+ }
+ else {
+ super.notifyChanged(notification);
+ }
+ }
+
+ @Override
+ protected void setTarget(Resource target) {
+ basicSetTarget(target);
+ }
+
+ @Override
+ protected void unsetTarget(Resource target) {
+ basicUnsetTarget(target);
+ resourceToDiagnosticMap.remove(target);
+ if (updateProblemIndication) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+ };
+
+ /**
+ * This listens for workspace changes.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IResourceChangeListener resourceChangeListener =
+ new IResourceChangeListener() {
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+ protected ResourceSet resourceSet = editingDomain.getResourceSet();
+ protected Collection<Resource> changedResources = new ArrayList<Resource>();
+ protected Collection<Resource> removedResources = new ArrayList<Resource>();
+
+ public boolean visit(IResourceDelta delta) {
+ if (delta.getResource().getType() == IResource.FILE) {
+ if (delta.getKind() == IResourceDelta.REMOVED ||
+ delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) {
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false);
+ if (resource != null) {
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ removedResources.add(resource);
+ }
+ else if (!savedResources.remove(resource)) {
+ changedResources.add(resource);
+ }
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+ public Collection<Resource> getChangedResources() {
+ return changedResources;
+ }
+
+ public Collection<Resource> getRemovedResources() {
+ return removedResources;
+ }
+ }
+
+ final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor();
+ delta.accept(visitor);
+
+ if (!visitor.getRemovedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ removedResources.addAll(visitor.getRemovedResources());
+ if (!isDirty()) {
+ getSite().getPage().closeEditor(PaletteconfigurationEditor.this, false);
+ }
+ }
+ });
+ }
+
+ if (!visitor.getChangedResources().isEmpty()) {
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ changedResources.addAll(visitor.getChangedResources());
+ if (getSite().getPage().getActiveEditor() == PaletteconfigurationEditor.this) {
+ handleActivate();
+ }
+ }
+ });
+ }
+ }
+ catch (CoreException exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ };
+
+ /**
+ * Handles activation of the editor or it's associated views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleActivate() {
+ // Recompute the read only state.
+ //
+ if (editingDomain.getResourceToReadOnlyMap() != null) {
+ editingDomain.getResourceToReadOnlyMap().clear();
+
+ // Refresh any actions that may become enabled or disabled.
+ //
+ setSelection(getSelection());
+ }
+
+ if (!removedResources.isEmpty()) {
+ if (handleDirtyConflict()) {
+ getSite().getPage().closeEditor(PaletteconfigurationEditor.this, false);
+ }
+ else {
+ removedResources.clear();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+ else if (!changedResources.isEmpty()) {
+ changedResources.removeAll(savedResources);
+ handleChangedResources();
+ changedResources.clear();
+ savedResources.clear();
+ }
+ }
+
+ /**
+ * Handles what to do with changed resources on activation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void handleChangedResources() {
+ if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) {
+ if (isDirty()) {
+ changedResources.addAll(editingDomain.getResourceSet().getResources());
+ }
+ editingDomain.getCommandStack().flush();
+
+ updateProblemIndication = false;
+ for (Resource resource : changedResources) {
+ if (resource.isLoaded()) {
+ resource.unload();
+ try {
+ resource.load(Collections.EMPTY_MAP);
+ }
+ catch (IOException exception) {
+ if (!resourceToDiagnosticMap.containsKey(resource)) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ }
+ }
+ }
+
+ if (AdapterFactoryEditingDomain.isStale(editorSelection)) {
+ setSelection(StructuredSelection.EMPTY);
+ }
+
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+ }
+
+ /**
+ * Updates the problems indication with the information described in the specified diagnostic.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void updateProblemIndication() {
+ if (updateProblemIndication) {
+ BasicDiagnostic diagnostic =
+ new BasicDiagnostic
+ (Diagnostic.OK,
+ "org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor",
+ 0,
+ null,
+ new Object [] { editingDomain.getResourceSet() });
+ for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) {
+ if (childDiagnostic.getSeverity() != Diagnostic.OK) {
+ diagnostic.add(childDiagnostic);
+ }
+ }
+
+ int lastEditorPage = getPageCount() - 1;
+ if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) {
+ ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ setActivePage(lastEditorPage);
+ }
+ }
+ else if (diagnostic.getSeverity() != Diagnostic.OK) {
+ ProblemEditorPart problemEditorPart = new ProblemEditorPart();
+ problemEditorPart.setDiagnostic(diagnostic);
+ problemEditorPart.setMarkerHelper(markerHelper);
+ try {
+ addPage(++lastEditorPage, problemEditorPart, getEditorInput());
+ setPageText(lastEditorPage, problemEditorPart.getPartName());
+ setActivePage(lastEditorPage);
+ showTabs();
+ }
+ catch (PartInitException exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+
+ if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
+ markerHelper.deleteMarkers(editingDomain.getResourceSet());
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ try {
+ markerHelper.createMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Shows a dialog that asks if conflicting changes should be discarded.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean handleDirtyConflict() {
+ return
+ MessageDialog.openQuestion
+ (getSite().getShell(),
+ getString("_UI_FileConflict_label"),
+ getString("_WARN_FileConflict"));
+ }
+
+ /**
+ * This creates a model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteconfigurationEditor() {
+ super();
+ initializeEditingDomain();
+ }
+
+ /**
+ * This sets up the editing domain for the model editor.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void initializeEditingDomain() {
+ // Create an adapter factory that yields item providers.
+ //
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+
+ adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new PaletteconfigurationItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
+
+ // Create the command stack that will notify this editor as commands are executed.
+ //
+ BasicCommandStack commandStack = new BasicCommandStack();
+
+ // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus.
+ //
+ commandStack.addCommandStackListener
+ (new CommandStackListener() {
+ public void commandStackChanged(final EventObject event) {
+ getContainer().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+
+ // Try to select the affected objects.
+ //
+ Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand();
+ if (mostRecentCommand != null) {
+ setSelectionToViewer(mostRecentCommand.getAffectedObjects());
+ }
+ for (Iterator<PropertySheetPage> i = propertySheetPages.iterator(); i.hasNext(); ) {
+ PropertySheetPage propertySheetPage = i.next();
+ if (propertySheetPage.getControl().isDisposed()) {
+ i.remove();
+ }
+ else {
+ propertySheetPage.refresh();
+ }
+ }
+ }
+ });
+ }
+ });
+
+ // Create the editing domain with a special command stack.
+ //
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ /**
+ * This is here for the listener to be able to call it.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void firePropertyChange(int action) {
+ super.firePropertyChange(action);
+ }
+
+ /**
+ * This sets the selection into whichever viewer is active.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelectionToViewer(Collection<?> collection) {
+ final Collection<?> theSelection = collection;
+ // Make sure it's okay.
+ //
+ if (theSelection != null && !theSelection.isEmpty()) {
+ Runnable runnable =
+ new Runnable() {
+ public void run() {
+ // Try to select the items in the current content viewer of the editor.
+ //
+ if (currentViewer != null) {
+ currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true);
+ }
+ }
+ };
+ getSite().getShell().getDisplay().asyncExec(runnable);
+ }
+ }
+
+ /**
+ * This returns the editing domain as required by the {@link IEditingDomainProvider} interface.
+ * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain}
+ * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getElements(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object [] getChildren(Object object) {
+ Object parent = super.getParent(object);
+ return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object) {
+ Object parent = super.getParent(object);
+ return parent != null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getParent(Object object) {
+ return null;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewerPane(ViewerPane viewerPane) {
+ if (currentViewerPane != viewerPane) {
+ if (currentViewerPane != null) {
+ currentViewerPane.showFocus(false);
+ }
+ currentViewerPane = viewerPane;
+ }
+ setCurrentViewer(currentViewerPane.getViewer());
+ }
+
+ /**
+ * This makes sure that one content viewer, either for the current page or the outline view, if it has focus,
+ * is the current one.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCurrentViewer(Viewer viewer) {
+ // If it is changing...
+ //
+ if (currentViewer != viewer) {
+ if (selectionChangedListener == null) {
+ // Create the listener on demand.
+ //
+ selectionChangedListener =
+ new ISelectionChangedListener() {
+ // This just notifies those things that are affected by the section.
+ //
+ public void selectionChanged(SelectionChangedEvent selectionChangedEvent) {
+ setSelection(selectionChangedEvent.getSelection());
+ }
+ };
+ }
+
+ // Stop listening to the old one.
+ //
+ if (currentViewer != null) {
+ currentViewer.removeSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Start listening to the new one.
+ //
+ if (viewer != null) {
+ viewer.addSelectionChangedListener(selectionChangedListener);
+ }
+
+ // Remember it.
+ //
+ currentViewer = viewer;
+
+ // Set the editors selection based on the current viewer's selection.
+ //
+ setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection());
+ }
+ }
+
+ /**
+ * This returns the viewer as required by the {@link IViewerProvider} interface.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Viewer getViewer() {
+ return currentViewer;
+ }
+
+ /**
+ * This creates a context menu for the viewer and adds a listener as well registering the menu for extension.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createContextMenuFor(StructuredViewer viewer) {
+ MenuManager contextMenu = new MenuManager("#PopUp");
+ contextMenu.add(new Separator("additions"));
+ contextMenu.setRemoveAllWhenShown(true);
+ contextMenu.addMenuListener(this);
+ Menu menu= contextMenu.createContextMenu(viewer.getControl());
+ viewer.getControl().setMenu(menu);
+ getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer));
+
+ int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK;
+ Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() };
+ viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer));
+ viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer));
+ }
+
+ /**
+ * This is the method called to load a resource into the editing domain's resource set based on the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createModel() {
+ URI resourceURI = EditUIUtil.getURI(getEditorInput());
+ Exception exception = null;
+ Resource resource = null;
+ try {
+ // Load the resource through the editing domain.
+ //
+ resource = editingDomain.getResourceSet().getResource(resourceURI, true);
+ }
+ catch (Exception e) {
+ exception = e;
+ resource = editingDomain.getResourceSet().getResource(resourceURI, false);
+ }
+
+ Diagnostic diagnostic = analyzeResourceProblems(resource, exception);
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter);
+ }
+
+ /**
+ * Returns a diagnostic describing the errors and warnings listed in the resource
+ * and the specified exception (if any).
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic =
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object [] { exception == null ? (Object)resource : exception });
+ basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
+ return basicDiagnostic;
+ }
+ else if (exception != null) {
+ return
+ new BasicDiagnostic
+ (Diagnostic.ERROR,
+ "org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor",
+ 0,
+ getString("_UI_CreateModelError_message", resource.getURI()),
+ new Object[] { exception });
+ }
+ else {
+ return Diagnostic.OK_INSTANCE;
+ }
+ }
+
+ /**
+ * This is the method used by the framework to install your own controls.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void createPages() {
+ // Creates the model from the editor input
+ //
+ createModel();
+
+ // Only creates the other pages if there is something that can be edited
+ //
+ if (!getEditingDomain().getResourceSet().getResources().isEmpty()) {
+ // Create a page for the selection tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ selectionViewer = (TreeViewer)viewerPane.getViewer();
+ selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+
+ selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ selectionViewer.setInput(editingDomain.getResourceSet());
+ selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ viewerPane.setTitle(editingDomain.getResourceSet());
+
+ new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(selectionViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_SelectionPage_label"));
+ }
+
+ // Create a page for the parent tree view.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ Tree tree = new Tree(composite, SWT.MULTI);
+ TreeViewer newTreeViewer = new TreeViewer(tree);
+ return newTreeViewer;
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ parentViewer = (TreeViewer)viewerPane.getViewer();
+ parentViewer.setAutoExpandLevel(30);
+ parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory));
+ parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(parentViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ParentPage_label"));
+ }
+
+ // This is the page for the list viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new ListViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ listViewer = (ListViewer)viewerPane.getViewer();
+ listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(listViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_ListPage_label"));
+ }
+
+ // This is the page for the tree viewer
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ treeViewer = (TreeViewer)viewerPane.getViewer();
+ treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory);
+
+ createContextMenuFor(treeViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreePage_label"));
+ }
+
+ // This is the page for the table viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TableViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+ tableViewer = (TableViewer)viewerPane.getViewer();
+
+ Table table = tableViewer.getTable();
+ TableLayout layout = new TableLayout();
+ table.setLayout(layout);
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+
+ TableColumn objectColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(3, 100, true));
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+
+ TableColumn selfColumn = new TableColumn(table, SWT.NONE);
+ layout.addColumnData(new ColumnWeightData(2, 100, true));
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+
+ tableViewer.setColumnProperties(new String [] {"a", "b"});
+ tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(tableViewer);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TablePage_label"));
+ }
+
+ // This is the page for the table tree viewer.
+ //
+ {
+ ViewerPane viewerPane =
+ new ViewerPane(getSite().getPage(), PaletteconfigurationEditor.this) {
+ @Override
+ public Viewer createViewer(Composite composite) {
+ return new TreeViewer(composite);
+ }
+ @Override
+ public void requestActivation() {
+ super.requestActivation();
+ setCurrentViewerPane(this);
+ }
+ };
+ viewerPane.createControl(getContainer());
+
+ treeViewerWithColumns = (TreeViewer)viewerPane.getViewer();
+
+ Tree tree = treeViewerWithColumns.getTree();
+ tree.setLayoutData(new FillLayout());
+ tree.setHeaderVisible(true);
+ tree.setLinesVisible(true);
+
+ TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE);
+ objectColumn.setText(getString("_UI_ObjectColumn_label"));
+ objectColumn.setResizable(true);
+ objectColumn.setWidth(250);
+
+ TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE);
+ selfColumn.setText(getString("_UI_SelfColumn_label"));
+ selfColumn.setResizable(true);
+ selfColumn.setWidth(200);
+
+ treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"});
+ treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+
+ createContextMenuFor(treeViewerWithColumns);
+ int pageIndex = addPage(viewerPane.getControl());
+ setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label"));
+ }
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ setActivePage(0);
+ }
+ });
+ }
+
+ // Ensures that this editor will only display the page's tab
+ // area if there are more than one page
+ //
+ getContainer().addControlListener
+ (new ControlAdapter() {
+ boolean guard = false;
+ @Override
+ public void controlResized(ControlEvent event) {
+ if (!guard) {
+ guard = true;
+ hideTabs();
+ guard = false;
+ }
+ }
+ });
+
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ updateProblemIndication();
+ }
+ });
+ }
+
+ /**
+ * If there is just one page in the multi-page editor part,
+ * this hides the single tab at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void hideTabs() {
+ if (getPageCount() <= 1) {
+ setPageText(0, "");
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(1);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y + 6);
+ }
+ }
+ }
+
+ /**
+ * If there is more than one page in the multi-page editor part,
+ * this shows the tabs at the bottom.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void showTabs() {
+ if (getPageCount() > 1) {
+ setPageText(0, getString("_UI_SelectionPage_label"));
+ if (getContainer() instanceof CTabFolder) {
+ ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
+ Point point = getContainer().getSize();
+ getContainer().setSize(point.x, point.y - 6);
+ }
+ }
+ }
+
+ /**
+ * This is used to track the active viewer.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void pageChange(int pageIndex) {
+ super.pageChange(pageIndex);
+
+ if (contentOutlinePage != null) {
+ handleContentOutlineSelection(contentOutlinePage.getSelection());
+ }
+ }
+
+ /**
+ * This is how the framework determines which interfaces we implement.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("rawtypes")
+ @Override
+ public Object getAdapter(Class key) {
+ if (key.equals(IContentOutlinePage.class)) {
+ return showOutlineView() ? getContentOutlinePage() : null;
+ }
+ else if (key.equals(IPropertySheetPage.class)) {
+ return getPropertySheetPage();
+ }
+ else if (key.equals(IGotoMarker.class)) {
+ return this;
+ }
+ else {
+ return super.getAdapter(key);
+ }
+ }
+
+ /**
+ * This accesses a cached version of the content outliner.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IContentOutlinePage getContentOutlinePage() {
+ if (contentOutlinePage == null) {
+ // The content outline is just a tree.
+ //
+ class MyContentOutlinePage extends ContentOutlinePage {
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ contentOutlineViewer = getTreeViewer();
+ contentOutlineViewer.addSelectionChangedListener(this);
+
+ // Set up the tree viewer.
+ //
+ contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
+ contentOutlineViewer.setInput(editingDomain.getResourceSet());
+
+ // Make sure our popups work.
+ //
+ createContextMenuFor(contentOutlineViewer);
+
+ if (!editingDomain.getResourceSet().getResources().isEmpty()) {
+ // Select the root object in the view.
+ //
+ contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
+ }
+ }
+
+ @Override
+ public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
+ super.makeContributions(menuManager, toolBarManager, statusLineManager);
+ contentOutlineStatusLineManager = statusLineManager;
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ }
+
+ contentOutlinePage = new MyContentOutlinePage();
+
+ // Listen to selection so that we can handle it is a special way.
+ //
+ contentOutlinePage.addSelectionChangedListener
+ (new ISelectionChangedListener() {
+ // This ensures that we handle selections correctly.
+ //
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleContentOutlineSelection(event.getSelection());
+ }
+ });
+ }
+
+ return contentOutlinePage;
+ }
+
+ /**
+ * This accesses a cached version of the property sheet.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IPropertySheetPage getPropertySheetPage() {
+ PropertySheetPage propertySheetPage =
+ new ExtendedPropertySheetPage(editingDomain) {
+ @Override
+ public void setSelectionToViewer(List<?> selection) {
+ PaletteconfigurationEditor.this.setSelectionToViewer(selection);
+ PaletteconfigurationEditor.this.setFocus();
+ }
+
+ @Override
+ public void setActionBars(IActionBars actionBars) {
+ super.setActionBars(actionBars);
+ getActionBarContributor().shareGlobalActions(this, actionBars);
+ }
+ };
+ propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
+ propertySheetPages.add(propertySheetPage);
+
+ return propertySheetPage;
+ }
+
+ /**
+ * This deals with how we want selection in the outliner to affect the other views.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void handleContentOutlineSelection(ISelection selection) {
+ if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) {
+ Iterator<?> selectedElements = ((IStructuredSelection)selection).iterator();
+ if (selectedElements.hasNext()) {
+ // Get the first selected element.
+ //
+ Object selectedElement = selectedElements.next();
+
+ // If it's the selection viewer, then we want it to select the same selection as this selection.
+ //
+ if (currentViewerPane.getViewer() == selectionViewer) {
+ ArrayList<Object> selectionList = new ArrayList<Object>();
+ selectionList.add(selectedElement);
+ while (selectedElements.hasNext()) {
+ selectionList.add(selectedElements.next());
+ }
+
+ // Set the selection to the widget.
+ //
+ selectionViewer.setSelection(new StructuredSelection(selectionList));
+ }
+ else {
+ // Set the input to the widget.
+ //
+ if (currentViewerPane.getViewer().getInput() != selectedElement) {
+ currentViewerPane.getViewer().setInput(selectedElement);
+ currentViewerPane.setTitle(selectedElement);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply tests the command stack.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isDirty() {
+ return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ }
+
+ /**
+ * This is for implementing {@link IEditorPart} and simply saves the model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSave(IProgressMonitor progressMonitor) {
+ // Save only resources that have actually changed.
+ //
+ final Map<Object, Object> saveOptions = new HashMap<Object, Object>();
+ saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+ saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED);
+
+ // Do the work within an operation because this is a long running activity that modifies the workbench.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ // This is the method that gets invoked when the operation runs.
+ //
+ @Override
+ public void execute(IProgressMonitor monitor) {
+ // Save the resources to the file system.
+ //
+ boolean first = true;
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ try {
+ long timeStamp = resource.getTimeStamp();
+ resource.save(saveOptions);
+ if (resource.getTimeStamp() != timeStamp) {
+ savedResources.add(resource);
+ }
+ }
+ catch (Exception exception) {
+ resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception));
+ }
+ first = false;
+ }
+ }
+ }
+ };
+
+ updateProblemIndication = false;
+ try {
+ // This runs the options, and shows progress.
+ //
+ new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
+
+ // Refresh the necessary state.
+ //
+ ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ }
+ catch (Exception exception) {
+ // Something went wrong that shouldn't.
+ //
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ updateProblemIndication = true;
+ updateProblemIndication();
+ }
+
+ /**
+ * This returns whether something has been persisted to the URI of the specified resource.
+ * The implementation uses the URI converter from the editor's resource set to try to open an input stream.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean isPersisted(Resource resource) {
+ boolean result = false;
+ try {
+ InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
+ if (stream != null) {
+ result = true;
+ stream.close();
+ }
+ }
+ catch (IOException e) {
+ // Ignore
+ }
+ return result;
+ }
+
+ /**
+ * This always returns true because it is not currently supported.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ return true;
+ }
+
+ /**
+ * This also changes the editor's input.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void doSaveAs() {
+ SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
+ saveAsDialog.open();
+ IPath path = saveAsDialog.getResult();
+ if (path != null) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+ if (file != null) {
+ doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void doSaveAs(URI uri, IEditorInput editorInput) {
+ (editingDomain.getResourceSet().getResources().get(0)).setURI(uri);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ IProgressMonitor progressMonitor =
+ getActionBars().getStatusLineManager() != null ?
+ getActionBars().getStatusLineManager().getProgressMonitor() :
+ new NullProgressMonitor();
+ doSave(progressMonitor);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void gotoMarker(IMarker marker) {
+ List<?> targetObjects = markerHelper.getTargetObjects(editingDomain, marker);
+ if (!targetObjects.isEmpty()) {
+ setSelectionToViewer(targetObjects);
+ }
+ }
+
+ /**
+ * This is called during startup.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void init(IEditorSite site, IEditorInput editorInput) {
+ setSite(site);
+ setInputWithNotify(editorInput);
+ setPartName(editorInput.getName());
+ site.setSelectionProvider(this);
+ site.getPage().addPartListener(partListener);
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setFocus() {
+ if (currentViewerPane != null) {
+ currentViewerPane.setFocus();
+ }
+ else {
+ getControl(getActivePage()).setFocus();
+ }
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.add(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+ selectionChangedListeners.remove(listener);
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ISelection getSelection() {
+ return editorSelection;
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection.
+ * Calling this result will notify the listeners.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSelection(ISelection selection) {
+ editorSelection = selection;
+
+ for (ISelectionChangedListener listener : selectionChangedListeners) {
+ listener.selectionChanged(new SelectionChangedEvent(this, selection));
+ }
+ setStatusLineManager(selection);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStatusLineManager(ISelection selection) {
+ IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ?
+ contentOutlineStatusLineManager : getActionBars().getStatusLineManager();
+
+ if (statusLineManager != null) {
+ if (selection instanceof IStructuredSelection) {
+ Collection<?> collection = ((IStructuredSelection)selection).toList();
+ switch (collection.size()) {
+ case 0: {
+ statusLineManager.setMessage(getString("_UI_NoObjectSelected"));
+ break;
+ }
+ case 1: {
+ String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next());
+ statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text));
+ break;
+ }
+ default: {
+ statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size())));
+ break;
+ }
+ }
+ }
+ else {
+ statusLineManager.setMessage("");
+ }
+ }
+ }
+
+ /**
+ * This looks up a string in the plugin's plugin.properties file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key) {
+ return PaletteConfigurationEditorPlugin.INSTANCE.getString(key);
+ }
+
+ /**
+ * This looks up a string in plugin.properties, making a substitution.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static String getString(String key, Object s1) {
+ return PaletteConfigurationEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
+ }
+
+ /**
+ * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void menuAboutToShow(IMenuManager menuManager) {
+ ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EditingDomainActionBarContributor getActionBarContributor() {
+ return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IActionBars getActionBars() {
+ return getActionBarContributor().getActionBars();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AdapterFactory getAdapterFactory() {
+ return adapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void dispose() {
+ updateProblemIndication = false;
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener);
+
+ getSite().getPage().removePartListener(partListener);
+
+ adapterFactory.dispose();
+
+ if (getActionBarContributor().getActiveEditor() == this) {
+ getActionBarContributor().setActiveEditor(null);
+ }
+
+ for (PropertySheetPage propertySheetPage : propertySheetPages) {
+ propertySheetPage.dispose();
+ }
+
+ if (contentOutlinePage != null) {
+ contentOutlinePage.dispose();
+ }
+
+ super.dispose();
+ }
+
+ /**
+ * Returns whether the outline view should be presented to the user.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean showOutlineView() {
+ return true;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationModelWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationModelWizard.java
new file mode 100644
index 00000000000..8a86ea4c4fa
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen/org/eclipse/papyrus/uml/diagram/paletteconfiguration/presentation/PaletteconfigurationModelWizard.java
@@ -0,0 +1,628 @@
+/**
+ */
+package org.eclipse.papyrus.uml.diagram.paletteconfiguration.presentation;
+
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.StringTokenizer;
+
+import org.eclipse.emf.common.CommonPlugin;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardPage;
+
+import org.eclipse.swt.SWT;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.ModifyEvent;
+
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+import org.eclipse.ui.actions.WorkspaceModifyOperation;
+
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.part.ISetSelectionTarget;
+
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationFactory;
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.PaletteconfigurationPackage;
+import org.eclipse.papyrus.uml.diagram.paletteconfiguration.provider.PaletteConfigurationEditPlugin;
+
+
+import org.eclipse.core.runtime.Path;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+
+
+/**
+ * This is a simple wizard for creating a new model file.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class PaletteconfigurationModelWizard extends Wizard implements INewWizard {
+ /**
+ * The supported extensions for created files.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<String> FILE_EXTENSIONS =
+ Collections.unmodifiableList(Arrays.asList(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationEditorFilenameExtensions").split("\\s*,\\s*")));
+
+ /**
+ * A formatted list of supported file extensions, suitable for display.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String FORMATTED_FILE_EXTENSIONS =
+ PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
+
+ /**
+ * This caches an instance of the model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteconfigurationPackage paletteconfigurationPackage = PaletteconfigurationPackage.eINSTANCE;
+
+ /**
+ * This caches an instance of the model factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteconfigurationFactory paletteconfigurationFactory = paletteconfigurationPackage.getPaletteconfigurationFactory();
+
+ /**
+ * This is the file creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteconfigurationModelWizardNewFileCreationPage newFileCreationPage;
+
+ /**
+ * This is the initial object creation page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PaletteconfigurationModelWizardInitialObjectCreationPage initialObjectCreationPage;
+
+ /**
+ * Remember the selection during initialization for populating the default container.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IStructuredSelection selection;
+
+ /**
+ * Remember the workbench during initialization.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IWorkbench workbench;
+
+ /**
+ * Caches the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected List<String> initialObjectNames;
+
+ /**
+ * This just records the information.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
+ setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(PaletteConfigurationEditorPlugin.INSTANCE.getImage("full/wizban/NewPaletteconfiguration")));
+ }
+
+ /**
+ * Returns the names of the types that can be created as the root object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getInitialObjectNames() {
+ if (initialObjectNames == null) {
+ initialObjectNames = new ArrayList<String>();
+ for (EClassifier eClassifier : paletteconfigurationPackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass)eClassifier;
+ if (!eClass.isAbstract()) {
+ initialObjectNames.add(eClass.getName());
+ }
+ }
+ }
+ Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
+ }
+ return initialObjectNames;
+ }
+
+ /**
+ * Create a new model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EObject createInitialModel() {
+ EClass eClass = (EClass)paletteconfigurationPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
+ EObject rootObject = paletteconfigurationFactory.create(eClass);
+ return rootObject;
+ }
+
+ /**
+ * Do the work after everything is specified.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean performFinish() {
+ try {
+ // Remember the file.
+ //
+ final IFile modelFile = getModelFile();
+
+ // Do the work within an operation.
+ //
+ WorkspaceModifyOperation operation =
+ new WorkspaceModifyOperation() {
+ @Override
+ protected void execute(IProgressMonitor progressMonitor) {
+ try {
+ // Create a resource set
+ //
+ ResourceSet resourceSet = new ResourceSetImpl();
+
+ // Get the URI of the model file.
+ //
+ URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
+
+ // Create a resource for this file.
+ //
+ Resource resource = resourceSet.createResource(fileURI);
+
+ // Add the initial model object to the contents.
+ //
+ EObject rootObject = createInitialModel();
+ if (rootObject != null) {
+ resource.getContents().add(rootObject);
+ }
+
+ // Save the contents of the resource to the file system.
+ //
+ Map<Object, Object> options = new HashMap<Object, Object>();
+ options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
+ resource.save(options);
+ }
+ catch (Exception exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ }
+ finally {
+ progressMonitor.done();
+ }
+ }
+ };
+
+ getContainer().run(false, false, operation);
+
+ // Select the new file resource in the current view.
+ //
+ IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbenchWindow.getActivePage();
+ final IWorkbenchPart activePart = page.getActivePart();
+ if (activePart instanceof ISetSelectionTarget) {
+ final ISelection targetSelection = new StructuredSelection(modelFile);
+ getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ }
+ });
+ }
+
+ // Open an editor on the new file.
+ //
+ try {
+ page.openEditor
+ (new FileEditorInput(modelFile),
+ workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
+ }
+ catch (PartInitException exception) {
+ MessageDialog.openError(workbenchWindow.getShell(), PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+ catch (Exception exception) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(exception);
+ return false;
+ }
+ }
+
+ /**
+ * This is the one page of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class PaletteconfigurationModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteconfigurationModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
+ super(pageId, selection);
+ }
+
+ /**
+ * The framework calls this to see if the file is correct.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean validatePage() {
+ if (super.validatePage()) {
+ String extension = new Path(getFileName()).getFileExtension();
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
+ setErrorMessage(PaletteConfigurationEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
+ }
+ }
+
+ /**
+ * This is the page where the type of object to create is selected.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public class PaletteconfigurationModelWizardInitialObjectCreationPage extends WizardPage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo initialObjectField;
+
+ /**
+ * @generated
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ protected List<String> encodings;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Combo encodingField;
+
+ /**
+ * Pass in the selection.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PaletteconfigurationModelWizardInitialObjectCreationPage(String pageId) {
+ super(pageId);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ {
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ layout.verticalSpacing = 12;
+ composite.setLayout(layout);
+
+ GridData data = new GridData();
+ data.verticalAlignment = GridData.FILL;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalAlignment = GridData.FILL;
+ composite.setLayoutData(data);
+ }
+
+ Label containerLabel = new Label(composite, SWT.LEFT);
+ {
+ containerLabel.setText(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ containerLabel.setLayoutData(data);
+ }
+
+ initialObjectField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ initialObjectField.setLayoutData(data);
+ }
+
+ for (String objectName : getInitialObjectNames()) {
+ initialObjectField.add(getLabel(objectName));
+ }
+
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.select(0);
+ }
+ initialObjectField.addModifyListener(validator);
+
+ Label encodingLabel = new Label(composite, SWT.LEFT);
+ {
+ encodingLabel.setText(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ encodingLabel.setLayoutData(data);
+ }
+ encodingField = new Combo(composite, SWT.BORDER);
+ {
+ GridData data = new GridData();
+ data.horizontalAlignment = GridData.FILL;
+ data.grabExcessHorizontalSpace = true;
+ encodingField.setLayoutData(data);
+ }
+
+ for (String encoding : getEncodings()) {
+ encodingField.add(encoding);
+ }
+
+ encodingField.select(0);
+ encodingField.addModifyListener(validator);
+
+ setPageComplete(validatePage());
+ setControl(composite);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModifyListener validator =
+ new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ setPageComplete(validatePage());
+ }
+ };
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected boolean validatePage() {
+ return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void setVisible(boolean visible) {
+ super.setVisible(visible);
+ if (visible) {
+ if (initialObjectField.getItemCount() == 1) {
+ initialObjectField.clearSelection();
+ encodingField.setFocus();
+ }
+ else {
+ encodingField.clearSelection();
+ initialObjectField.setFocus();
+ }
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getInitialObjectName() {
+ String label = initialObjectField.getText();
+
+ for (String name : getInitialObjectNames()) {
+ if (getLabel(name).equals(label)) {
+ return name;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getEncoding() {
+ return encodingField.getText();
+ }
+
+ /**
+ * Returns the label for the specified type name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected String getLabel(String typeName) {
+ try {
+ return PaletteConfigurationEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ }
+ catch(MissingResourceException mre) {
+ PaletteConfigurationEditorPlugin.INSTANCE.log(mre);
+ }
+ return typeName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<String> getEncodings() {
+ if (encodings == null) {
+ encodings = new ArrayList<String>();
+ for (StringTokenizer stringTokenizer = new StringTokenizer(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
+ encodings.add(stringTokenizer.nextToken());
+ }
+ }
+ return encodings;
+ }
+ }
+
+ /**
+ * The framework calls this to create the contents of the wizard.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ // Create a page, set the title, and the initial model file name.
+ //
+ newFileCreationPage = new PaletteconfigurationModelWizardNewFileCreationPage("Whatever", selection);
+ newFileCreationPage.setTitle(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationModelWizard_label"));
+ newFileCreationPage.setDescription(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationModelWizard_description"));
+ newFileCreationPage.setFileName(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
+ addPage(newFileCreationPage);
+
+ // Try and get the resource selection to determine a current directory for the file dialog.
+ //
+ if (selection != null && !selection.isEmpty()) {
+ // Get the resource...
+ //
+ Object selectedElement = selection.iterator().next();
+ if (selectedElement instanceof IResource) {
+ // Get the resource parent, if its a file.
+ //
+ IResource selectedResource = (IResource)selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
+ selectedResource = selectedResource.getParent();
+ }
+
+ // This gives us a directory...
+ //
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ // Set this for the container.
+ //
+ newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
+
+ // Make up a unique new name here.
+ //
+ String defaultModelBaseFilename = PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationEditorFilenameDefaultBase");
+ String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
+ String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
+ for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
+ }
+ newFileCreationPage.setFileName(modelFilename);
+ }
+ }
+ }
+ initialObjectCreationPage = new PaletteconfigurationModelWizardInitialObjectCreationPage("Whatever2");
+ initialObjectCreationPage.setTitle(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_PaletteconfigurationModelWizard_label"));
+ initialObjectCreationPage.setDescription(PaletteConfigurationEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ addPage(initialObjectCreationPage);
+ }
+
+ /**
+ * Get the file from the page.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IFile getModelFile() {
+ return newFileCreationPage.getModelFile();
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore
index c1a3bec3865..94cfbb03b97 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecore
@@ -1,14 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="paletteconfiguration"
- nsURI="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" nsPrefix="paletteconfiguration">
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="paletteconfiguration" nsURI="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
+ nsPrefix="paletteconfiguration">
<eClassifiers xsi:type="ecore:EClass" name="PaletteConfiguration" eSuperTypes="#//Configuration">
<eStructuralFeatures xsi:type="ecore:EReference" name="drawerConfigurations" lowerBound="1"
upperBound="-1" eType="#//DrawerConfiguration" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ToolConfiguration" eSuperTypes="#//LeafConfiguration">
- <eStructuralFeatures xsi:type="ecore:EReference" name="preValidationQuery" eType="ecore:EClass platform:/plugin/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore#//QueryConfiguration"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="#//ToolKind"
defaultValueLiteral="CreationTool"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="elementDescriptors" upperBound="-1"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag
index 71ee41642f5..95f8dfad3b3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.ecorediag
@@ -36,29 +36,6 @@
<element xmi:type="ecore:EClass" href="PaletteConfiguration.ecore#//ToolConfiguration"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_FwHQct3dEd-vY7OSNoF8nA" x="800" y="490" width="173" height="163"/>
</children>
- <children xmi:type="notation:Node" xmi:id="_UiCXMN3eEd-vY7OSNoF8nA" type="1001">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UjrV8N3eEd-vY7OSNoF8nA" source="Shortcut">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UjrV8d3eEd-vY7OSNoF8nA" key="modelID" value="EcoreTools"/>
- </eAnnotations>
- <children xmi:type="notation:Node" xmi:id="_UiCXM93eEd-vY7OSNoF8nA" type="4001"/>
- <children xmi:type="notation:Node" xmi:id="_UiCXNN3eEd-vY7OSNoF8nA" type="5001">
- <children xmi:type="notation:Node" xmi:id="_TSNWsOECEd-0CYOJPs0ewQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="platform:/plugin/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore#//QueryConfiguration/name"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_TSNWseECEd-0CYOJPs0ewQ"/>
- </children>
- <styles xmi:type="notation:DrawerStyle" xmi:id="_UiCXNd3eEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UiCXNt3eEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UiCXN93eEd-vY7OSNoF8nA"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_UiCXON3eEd-vY7OSNoF8nA" type="5002">
- <styles xmi:type="notation:DrawerStyle" xmi:id="_UiCXOd3eEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_UiCXOt3eEd-vY7OSNoF8nA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_UiCXO93eEd-vY7OSNoF8nA"/>
- </children>
- <styles xmi:type="notation:ShapeStyle" xmi:id="_UiCXMd3eEd-vY7OSNoF8nA" fontColor="4210752" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
- <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.ecore#//QueryConfiguration"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_UiCXMt3eEd-vY7OSNoF8nA" x="1095" y="490" width="178"/>
- </children>
<children xmi:type="notation:Node" xmi:id="_tJSakOAfEd-0CYOJPs0ewQ" type="1001">
<children xmi:type="notation:Node" xmi:id="_tJSak-AfEd-0CYOJPs0ewQ" type="4001"/>
<children xmi:type="notation:Node" xmi:id="_tJSalOAfEd-0CYOJPs0ewQ" type="5001">
@@ -250,20 +227,6 @@
<sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PIU2cOAhEd-0CYOJPs0ewQ" id="(0.9824561403508771,0.10294117647058823)"/>
<targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_HkoiGN3dEd-vY7OSNoF8nA" id="(0.07575757575757576,0.22058823529411764)"/>
</edges>
- <edges xmi:type="notation:Edge" xmi:id="_Ui7vEN3eEd-vY7OSNoF8nA" type="3002" source="_FwHQcN3dEd-vY7OSNoF8nA" target="_UiCXMN3eEd-vY7OSNoF8nA">
- <children xmi:type="notation:Node" xmi:id="_Ui7vFN3eEd-vY7OSNoF8nA" type="4011">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Ui7vFd3eEd-vY7OSNoF8nA" x="-8" y="-23"/>
- </children>
- <children xmi:type="notation:Node" xmi:id="_Ui7vFt3eEd-vY7OSNoF8nA" type="4012">
- <layoutConstraint xmi:type="notation:Location" xmi:id="_Ui7vF93eEd-vY7OSNoF8nA" x="3" y="7"/>
- </children>
- <styles xmi:type="notation:ConnectorStyle" xmi:id="_Ui7vEd3eEd-vY7OSNoF8nA" lineColor="4210752"/>
- <styles xmi:type="notation:FontStyle" xmi:id="_Ui7vEt3eEd-vY7OSNoF8nA" fontColor="4210752" fontHeight="10"/>
- <element xmi:type="ecore:EReference" href="PaletteConfiguration.ecore#//ToolConfiguration/preValidationQuery"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ui7vE93eEd-vY7OSNoF8nA" points="[0, 0, 0, 60]$[0, -60, 0, 0]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_VRRbwN3eEd-vY7OSNoF8nA" id="(0.9248554913294798,0.07364341085271318)"/>
- <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eWOMAuEpEd-0CYOJPs0ewQ" id="(0.011235955056179775,0.26153846153846155)"/>
- </edges>
<edges xmi:type="notation:Edge" xmi:id="_vgrvwOAfEd-0CYOJPs0ewQ" type="3002" source="_tJSakOAfEd-0CYOJPs0ewQ" target="_nCfB8HAKEeCt7epZDqnVSw">
<children xmi:type="notation:Node" xmi:id="_vgrvxOAfEd-0CYOJPs0ewQ" type="4011">
<layoutConstraint xmi:type="notation:Location" xmi:id="_vgrvxeAfEd-0CYOJPs0ewQ" x="-29" y="-18"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
index e87aa1a6cce..4f05bf87abb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/model/PaletteConfiguration.genmodel
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src-gen"
editDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit/src-gen"
editorDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration.editor/src-gen"
@@ -10,7 +9,7 @@
testsDirectory="/org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests/src-gen"
testSuiteClass="org.eclipse.papyrus.uml.diagram.paletteconfiguration.tests.PaletteConfigurationAllTests"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
- usedGenPackages="platform:/plugin/org.eclipse.papyrus.infra.queries.core.configuration/model/Configuration.genmodel#//configuration platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.genmodel#//query platform:/plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml">
+ usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
<foreignModel>PaletteConfiguration.ecore</foreignModel>
<genPackages prefix="Paletteconfiguration" basePackage="org.eclipse.papyrus.uml.diagram"
resource="XML" disposableProviderFactory="true" ecorePackage="PaletteConfiguration.ecore#/">
@@ -22,7 +21,6 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//PaletteConfiguration/drawerConfigurations"/>
</genClasses>
<genClasses ecoreClass="PaletteConfiguration.ecore#//ToolConfiguration">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//ToolConfiguration/preValidationQuery"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute PaletteConfiguration.ecore#//ToolConfiguration/kind"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PaletteConfiguration.ecore#//ToolConfiguration/elementDescriptors"/>
</genClasses>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml
index ce138e20d65..6e3e04edfd6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/plugin.xml
@@ -22,5 +22,4 @@
type="paletteconfiguration"
class="org.eclipse.papyrus.uml.diagram.paletteconfiguration.util.PaletteconfigurationResourceFactoryImpl"/>
</extension>
-
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java
index 3705a1fd291..77e13bcd66b 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration/src/org/eclipse/papyrus/uml/diagram/paletteconfiguration/provider/ExtendedPluginPaletteProvider.java
@@ -37,6 +37,7 @@ import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.PaletteSeparator;
import org.eclipse.gmf.runtime.common.core.service.AbstractProvider;
import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.ContributeToPaletteOperation;
import org.eclipse.gmf.runtime.diagram.ui.internal.services.palette.PaletteToolEntry;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.IPaletteProvider;
import org.eclipse.gmf.runtime.diagram.ui.services.palette.PaletteFactory;
@@ -100,15 +101,14 @@ public class ExtendedPluginPaletteProvider extends AbstractProvider implements I
protected static ImageDescriptor DEFAULT_DRAWER_IMAGE_DESCRIPTOR = Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "/icons/drawer.gif");
/**
- * Constructor.
- */
- public ExtendedPluginPaletteProvider() {
- }
-
- /**
* {@inheritDoc}
*/
public boolean provides(IOperation operation) {
+ if(operation instanceof ContributeToPaletteOperation) {
+ IEditorPart part = ((ContributeToPaletteOperation)operation).getEditor();
+ // check this can be a papyrus one. Otherwise, there should be no contribution
+ return true;
+ }
return false;
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
index 765c6a4faec..9343e0d0071 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/.settings/org.eclipse.core.resources.prefs
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
encoding//model/InvariantStereotypeConfiguration.ecore=UTF-8
encoding//model/InvariantStereotypeConfiguration.ecorediag=UTF-8
+encoding//model/SetTypeActionConfiguration.ecorediag=UTF-8
encoding//model/StereotypedElementMatcherConfiguration.ecore=UTF-8
encoding//model/StereotypedElementMatcherConfiguration.ecorediag=UTF-8
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
index bd045abfb6c..626aee53f55 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/META-INF/MANIFEST.MF
@@ -8,7 +8,10 @@ Export-Package: org.eclipse.papyrus.uml.tools.extendedtypes,
org.eclipse.papyrus.uml.tools.extendedtypes.invariantstereotypeconfiguration.util,
org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration,
org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.impl,
- org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util
+ org.eclipse.papyrus.uml.tools.extendedtypes.stereotypedelementmatcherconfiguration.util,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl,
+ org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
@@ -20,7 +23,12 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
org.eclipse.papyrus.infra.extendedtypes.emf;bundle-version="0.10.2",
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.2",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.2"
+ org.eclipse.papyrus.uml.tools;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.emf;bundle-version="0.10.2",
+ org.eclipse.papyrus.views.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.uml.properties;bundle-version="0.10.2",
+ org.eclipse.papyrus.infra.widgets;bundle-version="0.10.2",
+ org.eclipse.swt
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
@@ -28,9 +36,7 @@ Bundle-Version: 0.10.2.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activato
- r$Implementation
-Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singl
- eton:=true
+Bundle-Activator: org.eclipse.papyrus.uml.tools.extendedtypes.Activator$Implementation
+Bundle-SymbolicName: org.eclipse.papyrus.uml.tools.extendedtypes;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore
index 5e118264bf3..8fe7b9866c8 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecore
@@ -19,7 +19,6 @@
<eClassifiers xsi:type="ecore:EClass" name="FeatureToSet">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="featureName" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="atRuntime" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="value" lowerBound="1" eType="#//FeatureValue"
containment="true"/>
</eClassifiers>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag
index 8adafc4da14..112b44b0f51 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.ecorediag
@@ -89,10 +89,6 @@
<element xmi:type="ecore:EAttribute" href="ApplyStereotypeActionConfiguration.ecore#//FeatureToSet/featureName"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_5dOksYdrEeOi95YnkGlwiQ"/>
</children>
- <children xmi:type="notation:Node" xmi:id="_-qodsIdrEeOi95YnkGlwiQ" type="2001">
- <element xmi:type="ecore:EAttribute" href="ApplyStereotypeActionConfiguration.ecore#//FeatureToSet/atRuntime"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_-qodsYdrEeOi95YnkGlwiQ"/>
- </children>
<styles xmi:type="notation:DrawerStyle" xmi:id="_4BEItYdrEeOi95YnkGlwiQ"/>
<styles xmi:type="notation:SortingStyle" xmi:id="_4BEItodrEeOi95YnkGlwiQ"/>
<styles xmi:type="notation:FilteringStyle" xmi:id="_4BEIt4drEeOi95YnkGlwiQ"/>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel
index 992b870ca1e..feca27a51ca 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/ApplyStereotypeActionConfiguration.genmodel
@@ -21,7 +21,6 @@
</genClasses>
<genClasses ecoreClass="ApplyStereotypeActionConfiguration.ecore#//FeatureToSet">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute ApplyStereotypeActionConfiguration.ecore#//FeatureToSet/featureName"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute ApplyStereotypeActionConfiguration.ecore#//FeatureToSet/atRuntime"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference ApplyStereotypeActionConfiguration.ecore#//FeatureToSet/value"/>
</genClasses>
<genClasses image="false" ecoreClass="ApplyStereotypeActionConfiguration.ecore#//FeatureValue"/>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore
new file mode 100644
index 00000000000..2540c266ab7
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="settypeactionconfiguration" nsURI="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0"
+ nsPrefix="settypeactionconfiguration">
+ <eClassifiers xsi:type="ecore:EClass" name="SetTypeActionConfiguration" eSuperTypes="../../org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="validTypes" upperBound="-1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="creationTypes" upperBound="-1"
+ eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag
new file mode 100644
index 00000000000..3603f6ef5bf
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.ecorediag
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_EDs_0JSAEeO-cos6HUbWSw" type="EcoreTools" name="SetTypeActionConfiguration.ecorediag" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_EEtFYJSAEeO-cos6HUbWSw" type="1001">
+ <children xmi:type="notation:Node" xmi:id="_EFAAUJSAEeO-cos6HUbWSw" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_EFERwJSAEeO-cos6HUbWSw" type="5001">
+ <children xmi:type="notation:Node" xmi:id="_IQAoMJSAEeO-cos6HUbWSw" type="2001">
+ <element xmi:type="ecore:EAttribute" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/validTypes"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_IQAoMZSAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_KPiP8JSAEeO-cos6HUbWSw" type="2001">
+ <element xmi:type="ecore:EAttribute" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/creationTypes"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KPiP8ZSAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EFERwZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EFERwpSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EFERw5SAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_EFE40JSAEeO-cos6HUbWSw" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_EFE40ZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EFE40pSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EFE405SAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_EEtFYZSAEeO-cos6HUbWSw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="13761016" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EEtFYpSAEeO-cos6HUbWSw" x="300" y="395" height="158"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F1JvUJSAEeO-cos6HUbWSw" type="1001">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_F2ucoJSAEeO-cos6HUbWSw" source="Shortcut">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_F2ucoZSAEeO-cos6HUbWSw" key="modelID" value="EcoreTools"/>
+ </eAnnotations>
+ <children xmi:type="notation:Node" xmi:id="_F1K9cJSAEeO-cos6HUbWSw" type="4001"/>
+ <children xmi:type="notation:Node" xmi:id="_F1LkgJSAEeO-cos6HUbWSw" type="5001">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F1LkgZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F1LkgpSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F1Lkg5SAEeO-cos6HUbWSw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_F1MyoJSAEeO-cos6HUbWSw" type="5002">
+ <styles xmi:type="notation:DrawerStyle" xmi:id="_F1MyoZSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_F1MyopSAEeO-cos6HUbWSw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_F1Myo5SAEeO-cos6HUbWSw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_F1JvUZSAEeO-cos6HUbWSw" fontColor="4210752" fontName="Segoe UI" fontHeight="10" fillColor="12560536" lineColor="8421504"/>
+ <element xmi:type="ecore:EClass" href="platform:/plugin/org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.ecore#//SemanticActionConfiguration"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F1JvUpSAEeO-cos6HUbWSw" x="300" y="265"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_EDs_0ZSAEeO-cos6HUbWSw"/>
+ <element xmi:type="ecore:EPackage" href="SetTypeActionConfiguration.ecore#/"/>
+ <edges xmi:type="notation:Edge" xmi:id="_F11EwJSAEeO-cos6HUbWSw" type="3003" source="_EEtFYJSAEeO-cos6HUbWSw" target="_F1JvUJSAEeO-cos6HUbWSw">
+ <styles xmi:type="notation:ConnectorStyle" xmi:id="_F11r0JSAEeO-cos6HUbWSw" routing="Rectilinear" lineColor="4210752"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_F11r0ZSAEeO-cos6HUbWSw" fontName="Segoe UI"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_F11r0pSAEeO-cos6HUbWSw" points="[0, -20, -2, 101]$[0, -92, -2, 29]"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel
new file mode 100644
index 00000000000..20e99726e8a
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/model/SetTypeActionConfiguration.genmodel
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen" editDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.uml.tools.extendedtypes" modelName="SetTypeActionConfiguration"
+ modelPluginClass="" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ testsDirectory="/org.eclipse.papyrus.uml.tools.extendedtypes.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.papyrus.infra.extendedtypes/model/ExtendedTypes.genmodel#//extendedtypes"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>SetTypeActionConfiguration.ecore</foreignModel>
+ <genPackages prefix="SetTypeActionConfiguration" basePackage="org.eclipse.papyrus.uml.tools.extendedtypes"
+ disposableProviderFactory="true" ecorePackage="SetTypeActionConfiguration.ecore#/">
+ <genClasses ecoreClass="SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/validTypes"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SetTypeActionConfiguration.ecore#//SetTypeActionConfiguration/creationTypes"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
index 0ad8d706b2f..5deec45fe83 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/plugin.xml
@@ -53,8 +53,14 @@
type="applystereotypeactionconfiguration"
class="org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.util.ApplyStereotypeActionConfigurationResourceFactoryImpl"/>
</extension>
-
-
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated SetTypeActionConfiguration -->
+ <package
+ uri="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0"
+ class="org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage"
+ genModel="model/SetTypeActionConfiguration.genmodel"/>
+ </extension>
+
<!-- CUSTOM EXTENSIONS -->
<extension
point="org.eclipse.papyrus.infra.extendedtypes.aspectActionConfiguration">
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java
index 12afe4d881a..cdcba5b4562 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionConfigurationPackage.java
@@ -206,22 +206,13 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage {
int FEATURE_TO_SET__FEATURE_NAME = 0;
/**
- * The feature id for the '<em><b>At Runtime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FEATURE_TO_SET__AT_RUNTIME = 1;
-
- /**
* The feature id for the '<em><b>Value</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int FEATURE_TO_SET__VALUE = 2;
+ int FEATURE_TO_SET__VALUE = 1;
/**
* The number of structural features of the '<em>Feature To Set</em>' class.
@@ -230,7 +221,7 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage {
* @generated
* @ordered
*/
- int FEATURE_TO_SET_FEATURE_COUNT = 3;
+ int FEATURE_TO_SET_FEATURE_COUNT = 2;
/**
* The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureValueImpl <em>Feature Value</em>}' class.
@@ -443,17 +434,6 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage {
EAttribute getFeatureToSet_FeatureName();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>At Runtime</em>'.
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#isAtRuntime()
- * @see #getFeatureToSet()
- * @generated
- */
- EAttribute getFeatureToSet_AtRuntime();
-
- /**
* Returns the meta object for the containment reference '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -637,14 +617,6 @@ public interface ApplyStereotypeActionConfigurationPackage extends EPackage {
EAttribute FEATURE_TO_SET__FEATURE_NAME = eINSTANCE.getFeatureToSet_FeatureName();
/**
- * The meta object literal for the '<em><b>At Runtime</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute FEATURE_TO_SET__AT_RUNTIME = eINSTANCE.getFeatureToSet_AtRuntime();
-
- /**
* The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java
index 95fbb6f94ae..c0b83e52b34 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/FeatureToSet.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.ecore.EObject;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getFeatureName <em>Feature Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}</li>
* <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#getValue <em>Value</em>}</li>
* </ul>
* </p>
@@ -60,32 +59,6 @@ public interface FeatureToSet extends EObject {
void setFeatureName(String value);
/**
- * Returns the value of the '<em><b>At Runtime</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>At Runtime</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>At Runtime</em>' attribute.
- * @see #setAtRuntime(boolean)
- * @see org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfigurationPackage#getFeatureToSet_AtRuntime()
- * @model
- * @generated
- */
- boolean isAtRuntime();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.FeatureToSet#isAtRuntime <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>At Runtime</em>' attribute.
- * @see #isAtRuntime()
- * @generated
- */
- void setAtRuntime(boolean value);
-
- /**
* Returns the value of the '<em><b>Value</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java
index daf1451f1ad..5e690c01a8f 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/ApplyStereotypeActionConfigurationPackageImpl.java
@@ -249,17 +249,8 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl
* <!-- end-user-doc -->
* @generated
*/
- public EAttribute getFeatureToSet_AtRuntime() {
- return (EAttribute)featureToSetEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EReference getFeatureToSet_Value() {
- return (EReference)featureToSetEClass.getEStructuralFeatures().get(2);
+ return (EReference)featureToSetEClass.getEStructuralFeatures().get(1);
}
/**
@@ -364,7 +355,6 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl
featureToSetEClass = createEClass(FEATURE_TO_SET);
createEAttribute(featureToSetEClass, FEATURE_TO_SET__FEATURE_NAME);
- createEAttribute(featureToSetEClass, FEATURE_TO_SET__AT_RUNTIME);
createEReference(featureToSetEClass, FEATURE_TO_SET__VALUE);
featureValueEClass = createEClass(FEATURE_VALUE);
@@ -431,7 +421,6 @@ public class ApplyStereotypeActionConfigurationPackageImpl extends EPackageImpl
initEClass(featureToSetEClass, FeatureToSet.class, "FeatureToSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getFeatureToSet_FeatureName(), ecorePackage.getEString(), "featureName", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getFeatureToSet_AtRuntime(), theEcorePackage.getEBoolean(), "atRuntime", null, 0, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getFeatureToSet_Value(), this.getFeatureValue(), null, "value", null, 1, 1, FeatureToSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(featureValueEClass, FeatureValue.class, "FeatureValue", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java
index bb14c0f7fad..40839a13ea0 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/impl/FeatureToSetImpl.java
@@ -33,7 +33,6 @@ import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfigur
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl#getFeatureName <em>Feature Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl#isAtRuntime <em>At Runtime</em>}</li>
* <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.impl.FeatureToSetImpl#getValue <em>Value</em>}</li>
* </ul>
* </p>
@@ -62,26 +61,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
protected String featureName = FEATURE_NAME_EDEFAULT;
/**
- * The default value of the '{@link #isAtRuntime() <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAtRuntime()
- * @generated
- * @ordered
- */
- protected static final boolean AT_RUNTIME_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isAtRuntime() <em>At Runtime</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isAtRuntime()
- * @generated
- * @ordered
- */
- protected boolean atRuntime = AT_RUNTIME_EDEFAULT;
-
- /**
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -136,27 +115,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
* <!-- end-user-doc -->
* @generated
*/
- public boolean isAtRuntime() {
- return atRuntime;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setAtRuntime(boolean newAtRuntime) {
- boolean oldAtRuntime = atRuntime;
- atRuntime = newAtRuntime;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME, oldAtRuntime, atRuntime));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public FeatureValue getValue() {
return value;
}
@@ -219,8 +177,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
switch (featureID) {
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
return getFeatureName();
- case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- return isAtRuntime();
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE:
return getValue();
}
@@ -238,9 +194,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
setFeatureName((String)newValue);
return;
- case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- setAtRuntime((Boolean)newValue);
- return;
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE:
setValue((FeatureValue)newValue);
return;
@@ -259,9 +212,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
setFeatureName(FEATURE_NAME_EDEFAULT);
return;
- case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- setAtRuntime(AT_RUNTIME_EDEFAULT);
- return;
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE:
setValue((FeatureValue)null);
return;
@@ -279,8 +229,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
switch (featureID) {
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__FEATURE_NAME:
return FEATURE_NAME_EDEFAULT == null ? featureName != null : !FEATURE_NAME_EDEFAULT.equals(featureName);
- case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__AT_RUNTIME:
- return atRuntime != AT_RUNTIME_EDEFAULT;
case ApplyStereotypeActionConfigurationPackage.FEATURE_TO_SET__VALUE:
return value != null;
}
@@ -299,8 +247,6 @@ public class FeatureToSetImpl extends EObjectImpl implements FeatureToSet {
StringBuffer result = new StringBuffer(super.toString());
result.append(" (featureName: ");
result.append(featureName);
- result.append(", atRuntime: ");
- result.append(atRuntime);
result.append(')');
return result.toString();
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java
new file mode 100644
index 00000000000..36a150cd7ff
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfiguration.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Set Type Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes <em>Valid Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes <em>Creation Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration()
+ * @model
+ * @generated
+ */
+public interface SetTypeActionConfiguration extends SemanticActionConfiguration {
+ /**
+ * Returns the value of the '<em><b>Valid Types</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Valid Types</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Valid Types</em>' attribute list.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_ValidTypes()
+ * @model
+ * @generated
+ */
+ EList<String> getValidTypes();
+
+ /**
+ * Returns the value of the '<em><b>Creation Types</b></em>' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Creation Types</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Creation Types</em>' attribute list.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#getSetTypeActionConfiguration_CreationTypes()
+ * @model
+ * @generated
+ */
+ EList<String> getCreationTypes();
+
+} // SetTypeActionConfiguration
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java
new file mode 100644
index 00000000000..436cfde4572
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationFactory.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public interface SetTypeActionConfigurationFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SetTypeActionConfigurationFactory eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Set Type Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Set Type Action Configuration</em>'.
+ * @generated
+ */
+ SetTypeActionConfiguration createSetTypeActionConfiguration();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage();
+
+} //SetTypeActionConfigurationFactory
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java
new file mode 100644
index 00000000000..7f2c4924d58
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationPackage.java
@@ -0,0 +1,226 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface SetTypeActionConfigurationPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "settypeactionconfiguration";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/infra/extendedtypes/uml/settypeaction/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "settypeactionconfiguration";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ SetTypeActionConfigurationPackage eINSTANCE = org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl <em>Set Type Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration()
+ * @generated
+ */
+ int SET_TYPE_ACTION_CONFIGURATION = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__NAME = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__NAME;
+
+ /**
+ * The feature id for the '<em><b>Description</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__DESCRIPTION = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__DESCRIPTION;
+
+ /**
+ * The feature id for the '<em><b>Identifier</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__IDENTIFIER = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__IDENTIFIER;
+
+ /**
+ * The feature id for the '<em><b>Icon Entry</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__ICON_ENTRY = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION__ICON_ENTRY;
+
+ /**
+ * The feature id for the '<em><b>Valid Types</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Creation Types</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Set Type Action Configuration</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SET_TYPE_ACTION_CONFIGURATION_FEATURE_COUNT = ExtendedtypesPackage.SEMANTIC_ACTION_CONFIGURATION_FEATURE_COUNT + 2;
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration <em>Set Type Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Set Type Action Configuration</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration
+ * @generated
+ */
+ EClass getSetTypeActionConfiguration();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes <em>Valid Types</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Valid Types</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getValidTypes()
+ * @see #getSetTypeActionConfiguration()
+ * @generated
+ */
+ EAttribute getSetTypeActionConfiguration_ValidTypes();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes <em>Creation Types</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Creation Types</em>'.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration#getCreationTypes()
+ * @see #getSetTypeActionConfiguration()
+ * @generated
+ */
+ EAttribute getSetTypeActionConfiguration_CreationTypes();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl <em>Set Type Action Configuration</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationPackageImpl#getSetTypeActionConfiguration()
+ * @generated
+ */
+ EClass SET_TYPE_ACTION_CONFIGURATION = eINSTANCE.getSetTypeActionConfiguration();
+
+ /**
+ * The meta object literal for the '<em><b>Valid Types</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES = eINSTANCE.getSetTypeActionConfiguration_ValidTypes();
+
+ /**
+ * The meta object literal for the '<em><b>Creation Types</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES = eINSTANCE.getSetTypeActionConfiguration_CreationTypes();
+
+ }
+
+} //SetTypeActionConfigurationPackage
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java
new file mode 100644
index 00000000000..88b9fcb3b9d
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationFactoryImpl.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetTypeActionConfigurationFactoryImpl extends EFactoryImpl implements SetTypeActionConfigurationFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static SetTypeActionConfigurationFactory init() {
+ try {
+ SetTypeActionConfigurationFactory theSetTypeActionConfigurationFactory = (SetTypeActionConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(SetTypeActionConfigurationPackage.eNS_URI);
+ if (theSetTypeActionConfigurationFactory != null) {
+ return theSetTypeActionConfigurationFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new SetTypeActionConfigurationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: return createSetTypeActionConfiguration();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfiguration createSetTypeActionConfiguration() {
+ SetTypeActionConfigurationImpl setTypeActionConfiguration = new SetTypeActionConfigurationImpl();
+ return setTypeActionConfiguration;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationPackage getSetTypeActionConfigurationPackage() {
+ return (SetTypeActionConfigurationPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static SetTypeActionConfigurationPackage getPackage() {
+ return SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+
+} //SetTypeActionConfigurationFactoryImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java
new file mode 100644
index 00000000000..a368e94c791
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationImpl.java
@@ -0,0 +1,195 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import org.eclipse.papyrus.infra.extendedtypes.impl.SemanticActionConfigurationImpl;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Set Type Action Configuration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getValidTypes <em>Valid Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl.SetTypeActionConfigurationImpl#getCreationTypes <em>Creation Types</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SetTypeActionConfigurationImpl extends SemanticActionConfigurationImpl implements SetTypeActionConfiguration {
+ /**
+ * The cached value of the '{@link #getValidTypes() <em>Valid Types</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValidTypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> validTypes;
+
+ /**
+ * The cached value of the '{@link #getCreationTypes() <em>Creation Types</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreationTypes()
+ * @generated
+ * @ordered
+ */
+ protected EList<String> creationTypes;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SetTypeActionConfigurationImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return SetTypeActionConfigurationPackage.Literals.SET_TYPE_ACTION_CONFIGURATION;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getValidTypes() {
+ if (validTypes == null) {
+ validTypes = new EDataTypeUniqueEList<String>(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES);
+ }
+ return validTypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<String> getCreationTypes() {
+ if (creationTypes == null) {
+ creationTypes = new EDataTypeUniqueEList<String>(String.class, this, SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES);
+ }
+ return creationTypes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ return getValidTypes();
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ return getCreationTypes();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ getValidTypes().clear();
+ getValidTypes().addAll((Collection<? extends String>)newValue);
+ return;
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ getCreationTypes().clear();
+ getCreationTypes().addAll((Collection<? extends String>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ getValidTypes().clear();
+ return;
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ getCreationTypes().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES:
+ return validTypes != null && !validTypes.isEmpty();
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES:
+ return creationTypes != null && !creationTypes.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (validTypes: ");
+ result.append(validTypes);
+ result.append(", creationTypes: ");
+ result.append(creationTypes);
+ result.append(')');
+ return result.toString();
+ }
+
+} //SetTypeActionConfigurationImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java
new file mode 100644
index 00000000000..431da09544b
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/impl/SetTypeActionConfigurationPackageImpl.java
@@ -0,0 +1,209 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.papyrus.infra.extendedtypes.ExtendedtypesPackage;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationFactory;
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SetTypeActionConfigurationPackageImpl extends EPackageImpl implements SetTypeActionConfigurationPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass setTypeActionConfigurationEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private SetTypeActionConfigurationPackageImpl() {
+ super(eNS_URI, SetTypeActionConfigurationFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link SetTypeActionConfigurationPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static SetTypeActionConfigurationPackage init() {
+ if (isInited) return (SetTypeActionConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(SetTypeActionConfigurationPackage.eNS_URI);
+
+ // Obtain or create and register package
+ SetTypeActionConfigurationPackageImpl theSetTypeActionConfigurationPackage = (SetTypeActionConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SetTypeActionConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new SetTypeActionConfigurationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ExtendedtypesPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theSetTypeActionConfigurationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theSetTypeActionConfigurationPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theSetTypeActionConfigurationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(SetTypeActionConfigurationPackage.eNS_URI, theSetTypeActionConfigurationPackage);
+ return theSetTypeActionConfigurationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSetTypeActionConfiguration() {
+ return setTypeActionConfigurationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSetTypeActionConfiguration_ValidTypes() {
+ return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getSetTypeActionConfiguration_CreationTypes() {
+ return (EAttribute)setTypeActionConfigurationEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationFactory getSetTypeActionConfigurationFactory() {
+ return (SetTypeActionConfigurationFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ setTypeActionConfigurationEClass = createEClass(SET_TYPE_ACTION_CONFIGURATION);
+ createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__VALID_TYPES);
+ createEAttribute(setTypeActionConfigurationEClass, SET_TYPE_ACTION_CONFIGURATION__CREATION_TYPES);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ExtendedtypesPackage theExtendedtypesPackage = (ExtendedtypesPackage)EPackage.Registry.INSTANCE.getEPackage(ExtendedtypesPackage.eNS_URI);
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ setTypeActionConfigurationEClass.getESuperTypes().add(theExtendedtypesPackage.getSemanticActionConfiguration());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(setTypeActionConfigurationEClass, SetTypeActionConfiguration.class, "SetTypeActionConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getSetTypeActionConfiguration_ValidTypes(), theEcorePackage.getEString(), "validTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSetTypeActionConfiguration_CreationTypes(), theEcorePackage.getEString(), "creationTypes", null, 0, -1, SetTypeActionConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //SetTypeActionConfigurationPackageImpl
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java
new file mode 100644
index 00000000000..c0ef8931dcf
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationAdapterFactory.java
@@ -0,0 +1,188 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public class SetTypeActionConfigurationAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SetTypeActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SetTypeActionConfigurationSwitch<Adapter> modelSwitch =
+ new SetTypeActionConfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter caseSetTypeActionConfiguration(SetTypeActionConfiguration object) {
+ return createSetTypeActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseConfigurationElement(ConfigurationElement object) {
+ return createConfigurationElementAdapter();
+ }
+ @Override
+ public Adapter caseActionConfiguration(ActionConfiguration object) {
+ return createActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return createSemanticActionConfigurationAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration <em>Set Type Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfiguration
+ * @generated
+ */
+ public Adapter createSetTypeActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement <em>Configuration Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement
+ * @generated
+ */
+ public Adapter createConfigurationElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration <em>Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration
+ * @generated
+ */
+ public Adapter createActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration <em>Semantic Action Configuration</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration
+ * @generated
+ */
+ public Adapter createSemanticActionConfigurationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //SetTypeActionConfigurationAdapterFactory
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java
new file mode 100644
index 00000000000..333a7bbb8d4
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src-gen/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/util/SetTypeActionConfigurationSwitch.java
@@ -0,0 +1,172 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.papyrus.infra.extendedtypes.ActionConfiguration;
+import org.eclipse.papyrus.infra.extendedtypes.ConfigurationElement;
+import org.eclipse.papyrus.infra.extendedtypes.SemanticActionConfiguration;
+
+import org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration.SetTypeActionConfigurationPackage
+ * @generated
+ */
+public class SetTypeActionConfigurationSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static SetTypeActionConfigurationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SetTypeActionConfigurationSwitch() {
+ if (modelPackage == null) {
+ modelPackage = SetTypeActionConfigurationPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case SetTypeActionConfigurationPackage.SET_TYPE_ACTION_CONFIGURATION: {
+ SetTypeActionConfiguration setTypeActionConfiguration = (SetTypeActionConfiguration)theEObject;
+ T result = caseSetTypeActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseSemanticActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseActionConfiguration(setTypeActionConfiguration);
+ if (result == null) result = caseConfigurationElement(setTypeActionConfiguration);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Set Type Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Set Type Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSetTypeActionConfiguration(SetTypeActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Configuration Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConfigurationElement(ConfigurationElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActionConfiguration(ActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Semantic Action Configuration</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSemanticActionConfiguration(SemanticActionConfiguration object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //SetTypeActionConfigurationSwitch
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
index ee4b787ec99..11ad64dcaa0 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/applystereotypeactionconfiguration/ApplyStereotypeActionEditHelperAdvice.java
@@ -206,7 +206,7 @@ public class ApplyStereotypeActionEditHelperAdvice extends AbstractEditHelperAdv
Object stereotypeApplication = element.applyStereotype(stereotype);
if(rename && element instanceof NamedElement) {
if(((NamedElement)element).getNamespace()!=null) {
- String newName = NamedElementUtil.getDefaultNameWithIncrement(stereotype.getName(), element, ((NamedElement)element).getNamespace().getMembers());
+ String newName = NamedElementUtil.getDefaultNameWithIncrementFromBase(stereotype.getName(), ((NamedElement)element).getNamespace().getMembers());
((NamedElement)element).setName(newName);
}
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java
new file mode 100644
index 00000000000..23e19395eb6
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionConfigurationModelCreation.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.papyrus.infra.extendedtypes.IActionConfigurationModelCreation;
+
+
+/**
+ * {@link IActionConfigurationModelCreation} for {@link ApplyStereotypeActionConfiguration}
+ */
+public class SetTypeActionConfigurationModelCreation implements IActionConfigurationModelCreation<SetTypeActionConfiguration> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public SetTypeActionConfiguration createConfigurationModel() {
+ return SetTypeActionConfigurationFactory.eINSTANCE.createSetTypeActionConfiguration();
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java
new file mode 100644
index 00000000000..93787e751a3
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionCreationElementValidator.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionCreationElementValidator;
+
+/**
+ * {@link IActionCreationElementValidator} for {@link SetTypeActionConfiguration}
+ */
+public class SetTypeActionCreationElementValidator implements IActionCreationElementValidator<SetTypeActionConfiguration> {
+
+ protected SetTypeActionConfiguration configuration;
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean canCreate(CreateElementRequest request) {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(SetTypeActionConfiguration configuration) {
+ this.configuration = configuration;
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java
new file mode 100644
index 00000000000..61ddbecfcbd
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes/src/org/eclipse/papyrus/uml/tools/extendedtypes/settypeactionconfiguration/SetTypeActionEditHelperAdvice.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.extendedtypes.settypeactionconfiguration;
+
+import java.util.Arrays;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.papyrus.infra.extendedtypes.IActionEditHelperAdvice;
+import org.eclipse.papyrus.infra.extendedtypes.emf.Activator;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
+import org.eclipse.papyrus.uml.tools.extendedtypes.applystereotypeactionconfiguration.ApplyStereotypeActionConfiguration;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * advice for the {@link ApplyStereotypeActionConfiguration}
+ */
+public class SetTypeActionEditHelperAdvice extends AbstractEditHelperAdvice implements IActionEditHelperAdvice<SetTypeActionConfiguration> {
+
+ /** configuration for this edit helper advice */
+ protected SetTypeActionConfiguration configuration;
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(SetTypeActionConfiguration configuration) {
+ this.configuration = configuration;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean approveRequest(IEditCommandRequest request) {
+ return super.approveRequest(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getBeforeConfigureCommand(ConfigureRequest request) {
+ return super.getBeforeConfigureCommand(request);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getAfterConfigureCommand(ConfigureRequest request) {
+ if(configuration==null) {
+ return null;
+ }
+ ICommand resultCommand = null;
+ // retrieve eobject
+ final EObject elementToConfigure = request.getElementToConfigure();
+ if(!(elementToConfigure instanceof Element)) {
+ return null;
+ }
+
+ final TransactionalEditingDomain editingDomain = request.getEditingDomain();
+ if(editingDomain ==null) {
+ return null;
+ }
+ // retrieve edit service to get features from configure command
+ IElementEditService service = ElementEditServiceUtils.getCommandProvider(elementToConfigure);
+ if(service == null) {
+ Activator.log.error("Impossible to get edit service from element: " + elementToConfigure, null);
+ return null;
+ }
+
+ resultCommand = new AbstractTransactionalCommand(editingDomain, "Editing type", Arrays.asList((WorkspaceSynchronizer.getFile(elementToConfigure.eResource())))) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UMLModelElement umlModelElement = new UMLModelElement(elementToConfigure, editingDomain);
+ ReferenceValueFactory factory = umlModelElement.getValueFactory("type");
+ Object elemObject = factory.edit(Display.getDefault().getFocusControl(), elementToConfigure);
+ return CommandResult.newOKCommandResult(elemObject);
+ }
+ };
+
+ return resultCommand;
+ }
+
+ /**
+ * @return
+ */
+ protected EObject getDefaultTypeContainer(ConfigureRequest request) {
+ if(request.getElementToConfigure() instanceof Element) {
+ return ((Element)request.getElementToConfigure()).getNearestPackage();
+ }
+ return request.getElementToConfigure().eContainer();
+ }
+
+
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java
index f2d17196218..80546c1f6c1 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ElementUtil.java
@@ -30,6 +30,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.Image;
+import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PackageImport;
import org.eclipse.uml2.uml.Stereotype;
@@ -302,28 +303,58 @@ public class ElementUtil {
}
/**
- * Retrieve an list of all instances in the model that are instances of
- * the java.lang.Class metaType or with a stereotype applied
- *
- * @param <T>
+ * Retrieve an list of all instances in the Package that are instances of
+ * the java.lang.Class metaType OR with a stereotype applied
*
+ * @param topPackage
+ *
* @param metaType
- * selected classes
- * @param model
- * to check
+ * selected classes
* @param appliedStereotype
- * may be null, metatype is ignored if not null
+ * may be null, metatype is ignored if not null
* @return a list containing the selected instances
*/
- //duplicated code from /org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/Util.java
- //+add template to this method
- @SuppressWarnings("unchecked")
+
public static final <T extends EObject> List<T> getInstancesFilteredByType(final Package topPackage, final java.lang.Class<T> metaType, final Stereotype appliedStereotype) {
// retrieve parent element
// Package topPackage = Util.topPackage(element);
// Assert.isNotNull(topPackage,
// "Top package should not be null for element " + element);
- Iterator<EObject> iter = topPackage.eAllContents();
+ return getInstancesFilteredByType(topPackage.eAllContents(), metaType, appliedStereotype );
+ }
+
+ /**
+ * Retrieve an list of all instances in the Model that are instances of
+ * the java.lang.Class metaType OR with a stereotype applied
+ *
+ * @param topPackage
+ *
+ * @param metaType
+ * selected classes
+ * @param appliedStereotype
+ * may be null, metatype is ignored if not null
+ * @return a list containing the selected instances
+ */
+ public static final <T extends EObject> List<T> getInstancesFilteredByType(final Model model, final java.lang.Class<T> metaType, final Stereotype appliedStereotype) {
+ return getInstancesFilteredByType(model.eAllContents(), metaType, appliedStereotype );
+ }
+
+ /**
+ * Retrieve an list of all instances that are instances of
+ * the java.lang.Class metaType OR with a stereotype applied
+ *
+ * @param iter
+ * iterator on all the instances
+ * @param metaType
+ * selected classes
+ * @param appliedStereotype
+ * may be null, metatype is ignored if not null
+ * @return a list containing the selected instances
+ */
+ //duplicated code from /org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/Util.java
+ //+add template to this method
+ @SuppressWarnings("unchecked")
+ private static <T extends EObject> List<T> getInstancesFilteredByType(Iterator<EObject> iter, final java.lang.Class<T> metaType, final Stereotype appliedStereotype ) {
List<T> filteredElements = new ArrayList<T>();
while(iter.hasNext()) {
@@ -406,6 +437,6 @@ public class ElementUtil {
}
return filteredElements;
- }
+ }
}
diff --git a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly-tests/build.rmap b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly-tests/build.rmap
index b0988a116dc..68956b27ca6 100644
--- a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly-tests/build.rmap
+++ b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly-tests/build.rmap
@@ -140,7 +140,7 @@
<!-- CDO -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF CDO",0) -->
- <rm:uri format="{0}/modeling/emf/cdo/drops/R20130918-0029">
+ <rm:uri format="{0}/modeling/emf/cdo/drops/S20140211-0646">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -172,7 +172,7 @@
<!-- M2T Acceleo -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("M2T ACCELEO",0) -->
- <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201309031307">
+ <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201401221203">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -180,7 +180,7 @@
<!-- MDT OCL -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("MDT OCL 4.1.2",0) -->
- <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201401201522">
+ <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201402101137">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -244,7 +244,7 @@
<!-- EMF Compare -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF COMPARE",0) -->
- <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201309031318">
+ <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201402040808">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -288,7 +288,7 @@
<!-- GMF Tooling -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("GMF Tooling",0) -->
- <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones">
+ <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones-3.1.1">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -304,7 +304,7 @@
<!-- WST -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("WebTools",0) -->
- <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC1-20140121182103/repository/">
+ <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC3-20140210204322/repository/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -320,7 +320,7 @@
<!-- Eclipse Platform Milestones -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("Eclipse",0) -->
- <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC1-201401170910/">
+ <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC3-201402061000/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
diff --git a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly/build.rmap b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly/build.rmap
index e036406e10a..4da57df8b0f 100644
--- a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly/build.rmap
+++ b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-extra-nightly/build.rmap
@@ -256,7 +256,7 @@
<!-- CDO -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF CDO",0) -->
- <rm:uri format="{0}/modeling/emf/cdo/drops/R20130918-0029">
+ <rm:uri format="{0}/modeling/emf/cdo/drops/S20140211-0646">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -295,7 +295,7 @@
<!-- M2T Acceleo -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("M2T ACCELEO",0) -->
- <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201309031307">
+ <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201401221203">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -303,7 +303,7 @@
<!-- MDT OCL -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("MDT OCL 4.1.2",0) -->
- <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201401201522">
+ <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201402101137">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -367,7 +367,7 @@
<!-- EMF Compare -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF COMPARE",0) -->
- <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201309031318">
+ <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201402040808">
<!-- rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.0" -->
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
@@ -413,7 +413,7 @@
<!-- GMF Tooling -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("GMF Tooling",0) -->
- <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones">
+ <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones-3.1.1">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -437,7 +437,7 @@
<!-- WST -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("WebTools",0) -->
- <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC1-20140121182103/repository/">
+ <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC3-20140210204322/repository/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -445,7 +445,7 @@
<!-- Eclipse Platform Milestones -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("Eclipse",0) -->
- <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC1-201401170910/">
+ <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC3-201402061000/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
diff --git a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly-tests/build.rmap b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly-tests/build.rmap
index e69d2c7d9a1..2fe9ccd6e5c 100644
--- a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly-tests/build.rmap
+++ b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly-tests/build.rmap
@@ -211,7 +211,7 @@
<!-- M2T Acceleo -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("M2T ACCELEO",0) -->
- <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201309031307">
+ <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201401221203">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -219,7 +219,7 @@
<!-- MDT OCL -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("MDT OCL 4.1.2",0) -->
- <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201401201522">
+ <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201402101137">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -283,7 +283,7 @@
<!-- EMF Compare -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF COMPARE",0) -->
- <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201309031318">
+ <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201402040808">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -327,7 +327,7 @@
<!-- GMF Tooling -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("GMF Tooling",0) -->
- <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones">
+ <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones-3.1.1">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -343,7 +343,7 @@
<!-- WST -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("WebTools",0) -->
- <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC1-20140121182103/repository/">
+ <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC3-20140210204322/repository/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -351,7 +351,7 @@
<!-- Eclipse Platform Milestones -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("Eclipse",0) -->
- <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC1-201401170910/">
+ <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC3-201402061000/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
diff --git a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly/build.rmap b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly/build.rmap
index f48eabc4d89..23ed49642c6 100644
--- a/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly/build.rmap
+++ b/releng/org.eclipse.mdt.papyrus.releng.buckminster/papyrus-0.10-maintenance-nightly/build.rmap
@@ -407,7 +407,7 @@
<!-- M2T Acceleo -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("M2T ACCELEO",0) -->
- <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201309031307">
+ <rm:uri format="{0}/modeling/m2t/acceleo/updates/milestones/3.4/S201401221203">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -415,7 +415,7 @@
<!-- MDT OCL -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("MDT OCL 4.1.2",0) -->
- <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201401201522">
+ <rm:uri format="{0}/modeling/mdt/ocl/updates/maintenance/4.1.2/M201402101137">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -479,7 +479,7 @@
<!-- EMF Compare -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("EMF COMPARE",0) -->
- <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201309031318">
+ <rm:uri format="{0}/modeling/emf/compare/updates/milestones/2.1/S201402040808">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -523,7 +523,7 @@
<!-- GMF Tooling -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("GMF Tooling",0) -->
- <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones">
+ <rm:uri format="{0}/modeling/gmp/gmf-tooling/updates/milestones-3.1.1">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
@@ -539,14 +539,14 @@
<!-- WST -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("WebTools",0) -->
- <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC1-20140121182103/repository/">
+ <rm:uri format="{0}/webtools/downloads/drops/R3.5.2/M-3.5.2RC3-20140210204322/repository/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
<!-- Eclipse Platform Milestones -->
<rm:provider componentTypes="eclipse.feature,osgi.bundle" mutable="false" readerType="p2" source="false">
<!-- updateFrom("Eclipse",0) -->
- <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC1-201401170910/">
+ <rm:uri format="{0}/eclipse/updates/4.3-M-builds/M-4.3.2RC3-201402061000/">
<bc:propertyRef key="eclipse.downloads"/>
</rm:uri>
</rm:provider>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx
new file mode 100644
index 00000000000..09175a9012a
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ExtendedTypesTestsProfile.ctx
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ASCII"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="ExtendedTypesTestsProfile">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#/"/>
+ <tabs label="ExtendedTypesTestsProfile" id="extendedtypestestsprofile" priority="100">
+ <sections name="Single PackageWithComponents" sectionFile="ui/SinglePackageWithComponents.xwt">
+ <widget href="ui/SinglePackageWithComponents.xwt#/"/>
+ </sections>
+ <sections name="Multiple PackageWithComponents" sectionFile="ui/MultiplePackageWithComponents.xwt">
+ <widget href="ui/MultiplePackageWithComponents.xwt#/"/>
+ </sections>
+ <sections name="Single StereotypeWithFeaturesToSet" sectionFile="ui/SingleStereotypeWithFeaturesToSet.xwt">
+ <widget href="ui/SingleStereotypeWithFeaturesToSet.xwt#/"/>
+ </sections>
+ <sections name="Multiple StereotypeWithFeaturesToSet" sectionFile="ui/MultipleStereotypeWithFeaturesToSet.xwt">
+ <widget href="ui/MultipleStereotypeWithFeaturesToSet.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="Single StereotypeWithFeaturesToSet" sections="//@tabs.0/@sections.2" automaticContext="true" datacontexts="//@dataContexts.0/@elements.1">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSingleStereotypeWithFeaturesToSet">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.1"/>
+ <properties xsi:type="constraints:ValueProperty" name="stereotypeName" value="ExtendedTypesTestsProfile::StereotypeWithFeaturesToSet"/>
+ </constraints>
+ </views>
+ <dataContexts name="ExtendedTypesTestsProfile">
+ <elements name="PackageWithComponents">
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.1"/>
+ </elements>
+ <elements name="StereotypeWithFeaturesToSet">
+ <properties name="boolean" type="Boolean"/>
+ <properties name="multiStrings" multiplicity="-1"/>
+ <properties name="value" type="Integer"/>
+ <properties name="stringFeature"/>
+ <properties name="enumeration" type="Enumeration"/>
+ <supertypes href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@dataContexts.0/@elements.1"/>
+ </elements>
+ <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.2"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes
index 1dfdbd9e083..bee034e62cf 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/Test.extendedtypes
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<extendedtypes:ExtendedElementTypeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeactionconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/applystereotypeaction/1.0" xmlns:extendedtypes="http://www.eclipse.org/papyrus/infra/extendedtypes/1.0" xmlns:invariantcontainerconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/container/1.0" xmlns:invariantsemantictypeconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/1.0" xmlns:invariantstereotypeconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/stereotype/1.0" xmlns:setvaluesactionconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/setvaluesaction/1.0" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" name="Tests extended types" identifier="org.eclipse.papyrus.infra.extendedtypes.tests.tests">
+<extendedtypes:ExtendedElementTypeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeactionconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/uml/applystereotypeaction/1.0" xmlns:extendedtypes="http://www.eclipse.org/papyrus/infra/extendedtypes/1.0" xmlns:invariantcontainerconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/container/1.0" xmlns:invariantsemantictypeconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/1.0" xmlns:invariantstereotypeconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/semantictype/invariant/stereotype/1.0" xmlns:runtimevalueseditionactionconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/runtimevalueseditionaction/1.0" xmlns:setvaluesactionconfiguration="http://www.eclipse.org/papyrus/infra/extendedtypes/emf/setvaluesaction/1.0" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" name="Tests extended types" identifier="org.eclipse.papyrus.infra.extendedtypes.tests.tests">
<elementType xsi:type="invariantsemantictypeconfiguration:InvariantSemanticTypeConfiguration" name="Component in specific package only" identifier="org.eclipse.papyrus.infra.extendedtypes.tests.specificcomponent">
<iconEntry iconPath="icons/full/obj16/add_obj.gif" bundleId="org.eclipse.ui"/>
<specializedTypesID>org.eclipse.papyrus.uml.Component</specializedTypesID>
@@ -111,4 +111,12 @@
</stereotypesToApply>
</actionConfiguration>
</elementType>
+ <elementType xsi:type="extendedtypes:AspectSemanticTypeConfiguration" name="Package With Stereotype And Renamed - View" identifier="org.eclipse.papyrus.infra.extendedtypes.tests.classSimpleStereotypeRenameWithView">
+ <specializedTypesID>org.eclipse.papyrus.infra.extendedtypes.tests.classSimpleStereotypeRename</specializedTypesID>
+ <actionConfiguration xsi:type="runtimevalueseditionactionconfiguration:RuntimeValuesEditionActionConfiguration">
+ <viewsToDisplay>
+ <view href="ExtendedTypesTestsProfile.ctx#//@views.0"/>
+ </viewsToDisplay>
+ </actionConfiguration>
+ </elementType>
</extendedtypes:ExtendedElementTypeSet>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi
index 78dcd230f83..e48d7c47063 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/TestMenu.xmi
@@ -27,4 +27,7 @@
<menu xsi:type="ElementCreationMenuModel:CreationMenu"
label="Class - abstract - simple stereotype - set Values"
elementTypeIdRef="org.eclipse.papyrus.infra.extendedtypes.tests.abstractclassSimpleStereotype"/>
+ <menu xsi:type="ElementCreationMenuModel:CreationMenu"
+ label="Class - abstract - simple stereotype - set Values - view"
+ elementTypeIdRef="org.eclipse.papyrus.infra.extendedtypes.tests.classSimpleStereotypeRenameWithView"/>
</ElementCreationMenuModel:Folder>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
index 1ae1054eabf..254c4db1865 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/model.uml
@@ -8,7 +8,10 @@
<packagedElement xmi:type="uml:Component" xmi:id="_Y-QksGe-EeOeZsTtUeHY9w" name="Component2"/>
<packagedElement xmi:type="uml:Component" xmi:id="_M9hEwGfAEeOeZsTtUeHY9w" name="Component1"/>
</packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_dHWqAP1VEd-WkaQf4YgINA" name="PackageWithAllElements"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_dHWqAP1VEd-WkaQf4YgINA" name="PackageWithAllElements">
+ <packagedElement xmi:type="uml:Class" xmi:id="_FbcBIJO3EeOs4_QQK50yyQ" name="Class" isAbstract="true"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Lw35MJO3EeOs4_QQK50yyQ" name="StereotypeWithFeaturesToSetClass1"/>
+ </packagedElement>
<packagedElement xmi:type="uml:Package" xmi:id="_Caa0gGczEeO-Gf1_f5pJdw" name="OtherPackageWithComponents">
<packagedElement xmi:type="uml:Component" xmi:id="_8PG7EGctEeOYUqC_A3tTEw" name="Component"/>
<packagedElement xmi:type="uml:Component" xmi:id="_TCAGQGc9EeOeFPMFS4Wv8Q" name="Component1"/>
@@ -106,4 +109,8 @@
<ExtendedTypesTestsProfile_1:Module xmi:id="_cjKe8HkOEeOwQstt3pSj0Q" kind="Electrical"/>
<ExtendedTypesTestsProfile_1:Partition xmi:id="_gW-u0HkOEeOwQstt3pSj0Q"/>
<ExtendedTypesTestsProfile_1:Partition xmi:id="_hAeXwHkOEeOwQstt3pSj0Q"/>
+ <ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet xmi:id="_FccGsJO3EeOs4_QQK50yyQ" base_Element="_FbcBIJO3EeOs4_QQK50yyQ" stringFeature="MyOtherValue" value="18" boolean="true" enumeration="Enum2"/>
+ <ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet xmi:id="_LxXBYJO3EeOs4_QQK50yyQ" base_Element="_Lw35MJO3EeOs4_QQK50yyQ" stringFeature="Test Demo" value="3" enumeration="Enum2">
+ <multiStrings>demo</multiStrings>
+ </ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet>
</xmi:XMI>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt
new file mode 100644
index 00000000000..207c40fbd34
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.extendedtypes.tests/model/ui/SingleStereotypeWithFeaturesToSet.xwt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets" xmlns:x="http://www.eclipse.org/xwt" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout" xmlns:j="clr-namespace:java.lang"><Composite.layout><ppel:PropertiesLayout></ppel:PropertiesLayout></Composite.layout><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:StringEditor input="{Binding}" property="ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet:stringFeature"></ppe:StringEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout></Composite.layout><ppe:BooleanRadio input="{Binding}" property="ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet:boolean"></ppe:BooleanRadio></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout></Composite.layout><ppe:IntegerEditor input="{Binding}" property="ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet:value"></ppe:IntegerEditor></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:EnumCombo input="{Binding}" property="ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet:enumeration"></ppe:EnumCombo></Composite><Composite><Composite.layout><ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout></Composite.layout><ppe:MultiString input="{Binding}" property="ExtendedTypesTestsProfile:StereotypeWithFeaturesToSet:multiStrings"></ppe:MultiString></Composite></Composite> \ No newline at end of file
diff --git a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
index e8f8220e9dd..b306843dd3d 100644
--- a/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
+++ b/tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests/src/org/eclipse/papyrus/sysml/diagram/internalblock/tests/utils/TestUtils.java
@@ -1,748 +1,748 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils;
-
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramEditor;
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getDiagramView;
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getEditPart;
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getPaletteTool;
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.EditorUtils.getTransactionalEditingDomain;
-import static org.eclipse.papyrus.sysml.diagram.internalblock.tests.utils.TestPrepareUtils.createElement;
-import static org.junit.Assert.fail;
-
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ParameterizedCommand;
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IOperationHistoryListener;
-import org.eclipse.core.commands.operations.OperationHistoryEvent;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.ConnectionEditPart;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.RequestConstants;
-import org.eclipse.gef.Tool;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gef.requests.GroupRequest;
-import org.eclipse.gef.requests.ReconnectRequest;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction;
-import org.eclipse.gmf.runtime.common.ui.action.internal.actions.global.GlobalCopyAction;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.PopupMenuCommand;
-import org.eclipse.gmf.runtime.diagram.ui.menus.PopupMenu;
-import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
-import org.eclipse.gmf.runtime.notation.Connector;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.jface.commands.ActionHandler;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.gmfdiag.common.commands.SelectAndExecuteCommand;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.sysml.blocks.Block;
-import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
-import org.eclipse.papyrus.sysml.blocks.NestedConnectorEnd;
-import org.eclipse.papyrus.sysml.diagram.internalblock.Activator;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeConnectionTool.CreateAspectUnspecifiedTypeConnectionRequest;
-import org.eclipse.papyrus.uml.diagram.common.service.AspectUnspecifiedTypeCreationTool;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.commands.ICommandService;
-import org.eclipse.ui.handlers.IHandlerService;
-import org.eclipse.uml2.uml.ConnectableElement;
-import org.eclipse.uml2.uml.ConnectorEnd;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.util.UMLUtil;
-import org.junit.Assert;
-
-public class TestUtils {
-
- public static void deleteView(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
- View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
- deleteView(view, isAllowed);
- }
-
- public static void deleteView(View view, boolean isAllowed) throws Exception {
- // Find container EditPart (for command creation)
- EditPart containerEditPart = getEditPart(view);
- // Get delete view command
- Command command = containerEditPart.getCommand(new GroupRequest(RequestConstants.REQ_DELETE));
- // if the view deletion is not allowed the command should not be executable
- if(!isAllowed) {
- if((command == null) || (!command.canExecute())) {
- // Ok the command cannot be executed.
- } else {
- fail("The command should not be executable.");
- }
- } else {
- if((command == null) || (!command.canExecute())) {
- fail("The command should be executable.");
- } else {
- // Ok the command can be executed.
- defaultExecutionTest(command);
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
-
- public static void deleteElement(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
- View view = TestPrepareUtils.dropFromModelExplorer(elementType, getDiagramView());
- deleteElement(view, isAllowed);
- }
-
- public static void deleteElement(View view, boolean isAllowed) throws Exception {
- // Find container EditPart (for command creation)
- EditPart containerEditPart = getEditPart(view);
- // Prepare request
- DestroyElementRequest destroyRequest = new DestroyElementRequest(getTransactionalEditingDomain(), false);
- // Get delete command
- Command command = containerEditPart.getCommand(new EditCommandRequestWrapper(destroyRequest));
- // if the deletion is not allowed the command should not be executable
- if(!isAllowed) {
- if((command == null) || (!command.canExecute())) {
- // Ok the command cannot be executed.
- } else {
- fail("The command should not be executable.");
- }
- } else {
- if((command == null) || (!command.canExecute())) {
- fail("The command should be executable.");
- } else {
- // Ok the command can be executed.
- defaultExecutionTest(command);
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
-
- public static void dropFromModelExplorer(IElementType elementType, View containerView, boolean isAllowed) throws Exception {
- EObject newObject = createElement(elementType, containerView);
- dropFromModelExplorer(newObject, containerView, isAllowed);
- }
-
- public static void dropFromModelExplorer(EObject eObject, View containerView, boolean isAllowed) throws Exception {
- // Find container EditPart (for command creation)
- EditPart containerEditPart = getEditPart(containerView);
- // Prepare drop request
- DropObjectsRequest dropRequest = new DropObjectsRequest();
- ArrayList<EObject> list = new ArrayList<EObject>();
- list.add(eObject);
- dropRequest.setObjects(list);
- dropRequest.setLocation(new Point(200, 200));
- // Get drop command
- Command command = containerEditPart.getCommand(dropRequest);
- // if the drop is not allowed the command should not be executable
- if(!isAllowed) {
- if((command == null) || (!command.canExecute())) {
- // Ok the command cannot be executed.
- } else {
- fail("The command should not be executable.");
- }
- } else {
- if((command == null) || (!command.canExecute())) {
- fail("The command should be executable.");
- } else {
- // Ok the command can be executed.
- defaultExecutionTest(command);
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
-
- public static void altDropFromModelExplorer(EObject eObject, View containerView, List<String> expectedCommandNames, boolean isAllowed) throws Exception {
- // Find container EditPart (for command creation)
- EditPart containerEditPart = getEditPart(containerView);
- // Prepare drop request
- DropObjectsRequest dropRequest = new DropObjectsRequest();
- ArrayList<EObject> list = new ArrayList<EObject>();
- list.add(eObject);
- dropRequest.setObjects(list);
- dropRequest.setLocation(new Point(200, 200));
- // Get drop command
- Command command = containerEditPart.getCommand(dropRequest);
- // if the drop is not allowed the command should not be executable
- if(!isAllowed) {
- if((command == null) || (!command.canExecute())) {
- // Ok the command cannot be executed.
- } else {
- fail("The command should not be executable.");
- }
- } else {
- if((command == null) || (!command.canExecute())) {
- fail("The command should be executable.");
- } else {
- // Simple command
- if(expectedCommandNames.size() == 1) {
- if(expectedCommandNames.get(0).equals(command.getLabel())) {
- // Ok the command can be executed.
- defaultExecutionTest(command);
- // Test the results then
- // fail("Result tests not implemented.");
- EditorUtils.getCommandStack().undo();
- } else {
- fail("The expected kind of command was {" + expectedCommandNames.get(0) + "}, but was {" + command.getLabel() + "}");
- }
- } else if(expectedCommandNames.size() > 1) {
- ICommand tmpCommand = (command instanceof ICommandProxy) ? ((ICommandProxy)command).getICommand() : null;
- if((tmpCommand == null) || !(tmpCommand instanceof SelectAndExecuteCommand)) {
- fail("The drop command is not a selact and execute command.");
- }
- // Field accessibility modification to review elementary drop command available as
- // SelectAndExecuteCommand choices.
- SelectAndExecuteCommand selectCommand = (SelectAndExecuteCommand)tmpCommand;
- Field popupField = PopupMenuCommand.class.getDeclaredField("popupMenu");
- popupField.setAccessible(true);
- PopupMenu menu = (PopupMenu)popupField.get(selectCommand);
- Field content = PopupMenu.class.getDeclaredField("content");
- content.setAccessible(true);
- List<CompoundCommand> commandList = (List<CompoundCommand>)content.get(menu);
- if(commandList.size() != expectedCommandNames.size()) {
- fail("Unexpected number of possible alternate drop command.");
- }
- for(int i = 0; i < commandList.size(); i++) {
- CompoundCommand subCommand = commandList.get(i);
- if(expectedCommandNames.get(i).equals(subCommand.getLabel())) {
- // Ok the command can be executed.
- defaultExecutionTest(subCommand);
- // Add one more undo to go back in initial state before testing next command
- EditorUtils.getCommandStack().undo();;
- // Test the results then
- // fail("Result tests not implemented.");
- } else {
- fail("The expected kind of command was {" + expectedCommandNames.get(i) + "}.");
- }
- }
- }
- }
- }
- }
-
- public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed) throws Exception {
- if(isAllowed) {
- createNodeFromPalette(toolId, containerView, isAllowed, true);
- } else {
- createNodeFromPalette(toolId, containerView, isAllowed, false);
- }
- }
-
- public static void createNodeFromPalette(String toolId, View containerView, boolean isAllowed, boolean execute) throws Exception {
- // Find container EditPart (for command creation)
- EditPart containerEditPart = getEditPart(containerView);
- // Find palette tool to simulate element creation
- Tool tool = getPaletteTool(toolId);
- Request createRequest = getCreateRequest(tool);
- // Get creation command for request
- Command command = containerEditPart.getCommand(createRequest);
- // if the creation is not allowed the command should not be executable
- if(!isAllowed) {
- if((command == null) || (!command.canExecute())) {
- // Ok the command cannot be executed.
- } else {
- fail("The command should not be executable.");
- }
- } else {
- if((command == null) || (!command.canExecute())) {
- fail("The command should be executable.");
- } else {
- // Ok the command can be executed.
- if(execute) {
- defaultExecutionTest(command);
- }
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
-
- public static Request getCreateRequest(final Tool tool) throws Exception {
-
- // Don't forget to set the diagram viewer (required for preferenceHints to mimic manual creation)
- final IDiagramGraphicalViewer viewer = getDiagramEditor().getDiagramGraphicalViewer();
-
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- try {
- tool.setViewer(viewer);
- } catch (Exception ex) {
- ex.printStackTrace(System.out);
- }
- }
- });
-
- if(tool instanceof AspectUnspecifiedTypeCreationTool) {
- AspectUnspecifiedTypeCreationTool creationTool = (AspectUnspecifiedTypeCreationTool)tool;
- return creationTool.createCreateRequest();
- } else if(tool instanceof AspectUnspecifiedTypeConnectionTool) {
- AspectUnspecifiedTypeConnectionTool connectionTool = (AspectUnspecifiedTypeConnectionTool)tool;
- return connectionTool.new CreateAspectUnspecifiedTypeConnectionRequest(connectionTool.getElementTypes(), false, Activator.DIAGRAM_PREFERENCES_HINT);
- }
-
- throw new Exception("Unexpected kind of creation tool.");
- }
-
- public static void createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed) throws Exception {
- // Execute command only when the command is expected to be executable
- createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed);
- }
-
- public static EObject createEdgeFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute) throws Exception {
- // Find palette tool to simulate element creation and prepare request
- Tool tool = getPaletteTool(toolId);
- CreateAspectUnspecifiedTypeConnectionRequest createRequest = (CreateAspectUnspecifiedTypeConnectionRequest)getCreateRequest(tool);
- // Test source creation command
- createRequest.setSourceEditPart(getEditPart(sourceView));
- createRequest.setType(RequestConstants.REQ_CONNECTION_START);
- Command srcCommand = getEditPart(sourceView).getCommand(createRequest);
- // Test source command
- if((srcCommand == null) || !(srcCommand.canExecute())) { // Non-executable command
- if(targetView == null) { // Only test behavior on source
- if(!isAllowed) {
- // Current behavior matches the expected results
- return null;
- } else {
- fail("The command should be executable.");
- }
- } else { // Test complete creation, the command should necessary be executable
- fail("The command should be executable.");
- }
- } else { // Executable command
- if(targetView == null) { // Only test behavior on source
- if(!isAllowed) {
- fail("The command should not be executable.");
- } else {
- // Current behavior matches the expected results - no execution test.
- return null;
- }
- } else { // The command is executable and a target is provided - continue the test
- // Get target command (complete link creation)
- createRequest.setSourceEditPart(getEditPart(sourceView));
- createRequest.setTargetEditPart(getEditPart(targetView));
- createRequest.setType(RequestConstants.REQ_CONNECTION_END);
- Command tgtCommand = getEditPart(targetView).getCommand(createRequest);
- // Test the target command
- if((tgtCommand == null) || !(tgtCommand.canExecute())) { // Non-executable command
- if(!isAllowed) {
- // Current behavior matches the expected results
- return null;
- } else {
- fail("The command should be executable.");
- }
- } else { // Executable command
- if(!isAllowed) {
- fail("The command should not be executable.");
- } else {
- // Current behavior matches the expected results
- if(execute) { // Test command execution
- defaultExecutionTest(tgtCommand);
- // Retrieve created object via nested ElementAndViewCreationRequest.
- View newView = null;
- Iterator<?> it = createRequest.getAllRequests().iterator();
- while(it.hasNext() && newView == null) {
- CreateConnectionViewAndElementRequest subRequest = (CreateConnectionViewAndElementRequest)it.next();
- newView = (View)subRequest.getConnectionViewDescriptor().getAdapter(View.class);
- }
- if(newView != null) {
- return newView.getElement();
- } else {
- fail("No edge seem to have been created.");
- }
- }
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
- }
- return null;
- }
-
- public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
- createEdgeConnectorFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, nestedSourcePath, nestedTargetPath);
- }
-
- public static void createEdgeConnectorFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, List<Property> nestedSourcePath, List<Property> nestedTargetPath) throws Exception {
- EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
- // Abort if the command is not supposed to be executable
- if(!isAllowed) {
- return;
- }
- if((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
- fail("No edge or unexpected kind of edge created.");
- }
- // If previous test have not failed the execution / undo / re-do has been done
- org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)newLink;
- // Test source connector end
- NestedConnectorEnd sourceNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(0), NestedConnectorEnd.class);
- if(nestedSourcePath.isEmpty()) {
- Assert.assertNull("No nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
- } else {
- Assert.assertNotNull("Nested connector end stereotype should be applied on source.", sourceNestedConnectorEnd);
- Assert.assertEquals("Nested property path is incorrect for source", nestedSourcePath, sourceNestedConnectorEnd.getPropertyPath());
- // if(!sourceNestedConnectorEnd.getPropertyPath().equals(nestedSourcePath)) {
- // fail("The nested property path is incorrect for source.");
- // }
- }
- // Test target connector end
- NestedConnectorEnd targetNestedConnectorEnd = UMLUtil.getStereotypeApplication(connector.getEnds().get(1), NestedConnectorEnd.class);
- if(nestedTargetPath.isEmpty()) {
- Assert.assertNull("No nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
- } else {
- Assert.assertNotNull("Nested connector end stereotype should be applied on target.", targetNestedConnectorEnd);
- Assert.assertEquals("Nested property path is incorrect for target", nestedTargetPath, targetNestedConnectorEnd.getPropertyPath());
- // if(!targetNestedConnectorEnd.getPropertyPath().equals(nestedTargetPath)) {
- // fail("The nested property path is incorrect for target.");
- // }
- }
- }
-
- public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
- createEdgeConnectorAndTestDelegateFromPalette(toolId, sourceView, targetView, isAllowed, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
- }
-
- public static void createEdgeConnectorAndTestDelegateFromPalette(String toolId, View sourceView, View targetView, boolean isAllowed, boolean execute, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
- EObject newLink = createEdgeFromPalette(toolId, sourceView, targetView, isAllowed, execute);
- // Abort if the command is not supposed to be executable
- if(!isAllowed) {
- return;
- }
- if((newLink == null) || (!(newLink instanceof org.eclipse.uml2.uml.Connector))) {
- fail("No edge or unexpected kind of edge created.");
- }
- // If previous test have not failed the execution / undo / re-do has been done
- org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)newLink;
- // Test source connector end
- ConnectorEnd sourceConnectorEnd = connector.getEnds().get(0);
- if(sourceConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
- fail("The partWithPort is incorrect for source.");
- }
- // Test target connector end
- ConnectorEnd targetConnectorEnd = connector.getEnds().get(1);
- if(targetConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
- fail("The partWithPort is incorrect for target.");
- }
- }
-
- public static void reorientRelationshipSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
- reorientRelationship((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed);
- }
-
- public static void reorientRelationshipTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
- reorientRelationship((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed);
- }
-
- public static void reorientRelationship(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed) throws Exception {
- // Prepare request and add
- String reconnectDirection = (ReorientRelationshipRequest.REORIENT_SOURCE == reorientDirection) ? RequestConstants.REQ_RECONNECT_SOURCE : RequestConstants.REQ_RECONNECT_TARGET;
- ReconnectRequest reconnectRequest = new ReconnectRequest(relationshipView);
- reconnectRequest.setTargetEditPart(getEditPart(newEndView));
- reconnectRequest.setConnectionEditPart((ConnectionEditPart)getEditPart(relationshipView));
- reconnectRequest.setType(reconnectDirection);
- // Get command
- Command reorientCommand = getEditPart(newEndView).getCommand(reconnectRequest);
- // Test the target command
- if((reorientCommand == null) || !(reorientCommand.canExecute())) { // Non-executable command
- if(!isAllowed) {
- // Current behavior matches the expected results
- return;
- } else {
- fail("The command should be executable.");
- }
- } else { // Executable command
- if(!isAllowed) {
- fail("The command should not be executable.");
- } else {
- defaultExecutionTest(reorientCommand);
- // Test the results then
- // fail("Result tests not implemented.");
- }
- }
- }
-
- public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed) throws Exception {
- List<Property> nestedPath = Collections.emptyList();
- reorientConnectorSource(relationshipView, newSourceView, isAllowed, nestedPath);
- }
-
- public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed) throws Exception {
- List<Property> nestedPath = Collections.emptyList();
- reorientConnectorTarget(relationshipView, newTargetView, isAllowed, nestedPath);
- }
-
- public static void reorientConnectorSource(View relationshipView, View newSourceView, boolean isAllowed, List<Property> nestedPath) throws Exception {
- reorientConnector((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, nestedPath);
- }
-
- public static void reorientConnectorTarget(View relationshipView, View newTargetView, boolean isAllowed, List<Property> nestedPath) throws Exception {
- reorientConnector((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, nestedPath);
- }
-
- public static void reorientConnector(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, List<Property> nestedPath) throws Exception {
- reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
- // Abort if the command is not supposed to be executable
- if(!isAllowed) {
- return;
- }
- // If previous test have not failed the execution / undo / re-do has been done
- org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)relationshipView.getElement();
- ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
- NestedConnectorEnd nestedConnectorEnd = UMLUtil.getStereotypeApplication(modifiedConnectorEnd, NestedConnectorEnd.class);
- if(nestedPath.isEmpty()) {
- Assert.assertNull("No nested connector end stereotype should be applied.", nestedConnectorEnd);
- } else {
- Assert.assertNotNull("Nested connector end stereotype should be applied.", nestedConnectorEnd);
- Assert.assertEquals("Invalid nested path", nestedPath, nestedConnectorEnd.getPropertyPath());
- }
- }
-
- public static void reorientConnectorSourceAndTestDelegate(View relationshipView, View newSourceView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
- reorientConnectorAndTestDelegate((Connector)relationshipView, newSourceView, ReorientRelationshipRequest.REORIENT_SOURCE, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
- }
-
- public static void reorientConnectorTargetAndTestDelegate(View relationshipView, View newTargetView, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
- reorientConnectorAndTestDelegate((Connector)relationshipView, newTargetView, ReorientRelationshipRequest.REORIENT_TARGET, isAllowed, expectedSourcePartWithPort, expectedTargetPartWithPort);
- }
-
- public static void reorientConnectorAndTestDelegate(Connector relationshipView, View newEndView, int reorientDirection, boolean isAllowed, ConnectableElement expectedSourcePartWithPort, ConnectableElement expectedTargetPartWithPort) throws Exception {
- reorientRelationship(relationshipView, newEndView, reorientDirection, isAllowed);
- // Abort if the command is not supposed to be executable
- if(!isAllowed) {
- return;
- }
- // If previous test have not failed the execution / undo / re-do has been done
- org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)relationshipView.getElement();
- ConnectorEnd modifiedConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(0) : connector.getEnds().get(1);
- ConnectorEnd oppositeConnectorEnd = (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) ? connector.getEnds().get(1) : connector.getEnds().get(0);
- if(reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) { // re-orient source
- // Test source connector end
- Assert.assertEquals("The partWithPort is incorrect for source (re-oriented).", expectedSourcePartWithPort, modifiedConnectorEnd.getPartWithPort());
- // if(modifiedConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
- // fail("The partWithPort is incorrect for source (re-oriented).");
- // }
- // Test target connector end
- Assert.assertEquals("The partWithPort is incorrect for target (opposite end).", expectedTargetPartWithPort, oppositeConnectorEnd.getPartWithPort());
- // if(oppositeConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
- // fail("The partWithPort is incorrect for target (opposite end).");
- // }
- } else { // re-orient target
- // Test source connector end
- Assert.assertEquals("The partWithPort is incorrect for target (re-oriented).", expectedTargetPartWithPort, modifiedConnectorEnd.getPartWithPort());
- // if(modifiedConnectorEnd.getPartWithPort() != expectedTargetPartWithPort) {
- // fail("The partWithPort is incorrect for target .");
- // }
- // Test target connector end
- Assert.assertEquals("The partWithPort is incorrect for source (opposite end).", expectedSourcePartWithPort, oppositeConnectorEnd.getPartWithPort());
- // if(oppositeConnectorEnd.getPartWithPort() != expectedSourcePartWithPort) {
- // fail("The partWithPort is incorrect for source (opposite end).");
- // }
- }
- }
-
- public static void setEncapsulationDeleteConnectorTest(Element block, View sourceView, View targetView, boolean canCreateConnector, boolean isConnectorDestroyExpected) throws Exception {
- if(!canCreateConnector) {
- return; // abort
- }
- // Make sure the block is not encapsulated before Connector creation.
- TestPrepareUtils.setBlockIsEncapsulated(block, false);
- // Create connector
- org.eclipse.uml2.uml.Connector connector = (org.eclipse.uml2.uml.Connector)createEdgeFromPalette("internalblock.tool.connector", sourceView, targetView, true, true);
- // Prepare set encapsulated command and execute (with undo, re-do).
- Block blockApp = UMLUtil.getStereotypeApplication(block, Block.class);
- IElementEditService provider = ElementEditServiceUtils.getCommandProvider(blockApp);
- if(provider == null) {
- fail("Could not get IElementEditService for Block stereotype application.");
- }
- IEditCommandRequest setEncapsulationRequest = new SetRequest(getTransactionalEditingDomain(), blockApp, BlocksPackage.eINSTANCE.getBlock_IsEncapsulated(), true);
- ICommand setEncapsulationCommand = provider.getEditCommand(setEncapsulationRequest);
- defaultExecutionTest(new ICommandProxy(setEncapsulationCommand));
- // Test if the Connector have been destroyed
- if(isConnectorDestroyExpected) {
- if(connector.eResource() != null) { // connector destroyed has no container
- fail("Connector was expected to be destroyed.");
- }
- } else {
- if(connector.eResource() == null) { // connector destroyed has no container
- fail("Connector was not expected to be destroyed.");
- }
- }
- }
-
- /**
- * Copy the list of objects into the Clipboard
- *
- * @param objectsToCopy
- * the list of objects to copy. should not be <code>null</code>, at least an empty list
- * @throws Exception
- * exception thrown in case of problems
- */
- public static void copyEditParts(List<Object> objectsToCopy) throws Exception {
- // select elements to copy
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().bringToTop(EditorUtils.getEditor());
- EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(objectsToCopy));
- ISelection selection = EditorUtils.getEditor().getSite().getSelectionProvider().getSelection();
- Assert.assertEquals("Selection size should be " + objectsToCopy.size(), objectsToCopy.size(), ((IStructuredSelection)selection).size());
- // retrieve the command for copy
- ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
- commandService.refreshElements(IWorkbenchCommandConstants.EDIT_COPY, null);
- org.eclipse.core.commands.Command copyCommand = commandService.getCommand(IWorkbenchCommandConstants.EDIT_COPY);
- ((GlobalCopyAction)((ActionHandler)copyCommand.getHandler()).getAction()).setEnabled(true);
- Assert.assertNotNull("Impossible to find copy command", copyCommand);
- //EditorUtils.getDiagramEditor().getEditingDomain().setClipboard(objectsToCopy);
- // retrieve handler service for the copy command
- IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
- Assert.assertNotNull("Impossible to find handler service", handlerService);
- final ParameterizedCommand parameterizedCommand = new ParameterizedCommand(copyCommand, null);
- // retrieve the command and set some parameters on it
- copyCommand.setEnabled(handlerService.getCurrentState());
- final boolean commandEnabled = copyCommand.isEnabled();
- Assert.assertTrue("Command should be enabled", commandEnabled);
- // execute the copy command
- handlerService.executeCommand(parameterizedCommand, null);
- }
-
- /**
- * paste the list of objects into the Clipboard into the current diagram
- *
- * @param target
- * object on which content of the clipboard should be added
- * @param executable
- * indicates if the paste command should be executable.
- *
- * @throws Exception
- * exception thrown in case of problems
- */
- public static void pasteEditParts(Object target, boolean executable) throws Exception {
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(EditorUtils.getEditor());
- EditorUtils.getDiagramEditor().getEditorSite().getSelectionProvider().setSelection(new StructuredSelection(target));
- // retrieve the command for copy
- ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
- commandService.refreshElements(IWorkbenchCommandConstants.EDIT_PASTE, null);
- org.eclipse.core.commands.Command pa