Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt3
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF6
-rw-r--r--extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java4
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java1
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java11
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlModelWizard.java4
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlProjectWizard.java4
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF39
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/Protocol.custom155
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/SimpleUMLRT.custom43
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_in.gifbin0 -> 541 bytes
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_inout.gifbin0 -> 910 bytes
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_out.gifbin0 -> 327 bytes
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_undefined.gifbin0 -> 333 bytes
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/newchildmenu/newChildMenu.xmi4
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/plugin.xml12
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/provider/UMLRTFilteredLabelProvider.java61
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/DisplayMessagesOnlyQuery.java35
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetFilteredProtocolsPackageElementsQuery.java39
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInFromProtocolContainerQuery.java2
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInOutFromProtocolContainerQuery.java2
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageOutFromProtocolContainerQuery.java2
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetRTMessagesInQuery.java38
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/HideProtocolContainersQuery.java50
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainerQuery.java15
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainersContainerQuery.java31
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolQuery.java32
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTModelWizard.java5
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTProjectWizard.java4
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.elementtypesconfigurations16
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.umlclassdiagram.elementtypesconfigurations10
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/IUMLRTElementTypes.java5
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/UMLRTElementTypesEnumerator.java8
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/BehavioredClassifierEditHelperAdvice.java4
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java68
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/ProtocolContainerEditHelperAdvice.java37
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageInMatcher.java34
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageMatcher.java33
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageSetUtils.java15
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java214
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolUtils.java43
-rw-r--r--extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/RTMessageUtils.java73
-rw-r--r--plugins/developer/org.eclipse.papyrus.doc/intro/firststeps.xml2
-rw-r--r--plugins/developer/org.eclipse.papyrus.doc/intro/overview.xml2
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF2
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki4
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedMode.pngbin0 -> 2848 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedModeXText.pngbin0 -> 2453 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonSwitch.pngbin0 -> 1919 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonsEdit.pngbin0 -> 1213 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/preferencesMultiplicityEditor.pngbin0 -> 26511 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleMode.pngbin0 -> 1477 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleModeDisabled.pngbin0 -> 1441 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view-main-toc.xml14
-rw-r--r--plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki692
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/plugin.xml100
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java29
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java29
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java69
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java304
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java2826
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java382
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java55
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/icons/Switch_12x12.gifbin0 -> 304 bytes
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractReferenceDialog.java178
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IReferenceValueEditor.java73
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultiplicityDialog.java605
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java28
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java38
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java122
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java273
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties111
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/MultiplicityConstants.java45
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java11
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java9
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi63
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration141
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java69
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations795
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations493
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration56
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration795
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration900
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations199
-rw-r--r--plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel29
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java1358
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java76
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java39
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.project10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/DeveloperDoc.html1
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF21
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/build.properties9
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/help/helpContext.xml16
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/checked.gifbin0 -> 1627 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/unchecked.gifbin0 -> 1628 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/ClassDiagram.pngbin0 -> 3683 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/Component_Diagram.pngbin0 -> 5937 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/NewComponentDiagram.pngbin0 -> 3622 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/UseCaseDiagram.pngbin0 -> 29068 bytes
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.di2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.notation818
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.uml302
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/plugin.xml15
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/schema/templates.exsd57
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractNewModelStorageProvider.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractSelectStorageProviderPart.java83
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java855
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateSeveralModelsWizard.java239
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/INewModelStorageProvider.java129
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitDiagramAction.java86
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitModelWizard.java278
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/Messages.java161
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/ModelCopyWizard.java203
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewModelStorageProviderRegistry.java260
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java90
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWizard.java154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewProjectAction.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/WorkspaceNewModelStorageProvider.java154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/action/NewProjectAction.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/NewPapyrusModelCommand.java43
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/PapyrusModelFromExistingDomainModelCommand.java84
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/CopyModelCommand.java42
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/InitFromTemplateCommand.java204
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java51
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/PapyrusModelFromExistingDomainModelCommand.java109
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindComposite.java344
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/Messages.java172
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/messages.properties (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/messages.properties)20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewDiagramForExistingModelPage.java71
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java47
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/PapyrusProjectCreationPage.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java81
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java277
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRootElementPage.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectStorageProviderPage.java13
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractNewModelStorageProvider.java58
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractSelectStorageProviderPart.java63
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/INewModelStorageProvider.java113
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/NewModelStorageProviderRegistry.java223
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/WorkspaceNewModelStorageProvider.java169
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/AbstractModelTemplateContentProvider.java137
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/InitFromTemplateCommand.java266
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateDescription.java35
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateTransfoProvider.java59
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesContentProvider.java108
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesLabelProvider.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/SelectModelTemplateComposite.java167
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/IGenerator.java28
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/QVToGenerator.java154
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/SettingsHelper.java (renamed from plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/SettingsHelper.java)23
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/WizardsHelper.java8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/ExtensionFilter.java62
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/FileChooser.java155
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateModelWizard.java943
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateSeveralModelsWizard.java218
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/InitModelWizard.java235
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/ModelCopyWizard.java172
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWithMultiModelsWizard.java99
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWizard.java158
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/ProfileCopyTemplateTransfo.qvto10
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/UMLCopyTemplateTransfo.qvto10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.perspective/plugin.xml2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.perspective/src/org/eclipse/papyrus/uml/perspective/PapyrusPerspective.java8
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.service.validation/src/org/eclipse/papyrus/uml/service/validation/OCLEValidatorAdapter.java20
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.templaterepository/META-INF/MANIFEST.MF6
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.templaterepository/plugin.xml17
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/Activator.java9
-rwxr-xr-xplugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInModel.java96
-rwxr-xr-xplugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInProfile.java103
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/MultiplicityXTextValueEditor.java142
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java110
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/MultiplicityXTextDialog.java117
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt37
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MultipleProperty.xwt66
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt106
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectorEnd.xwt47
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt106
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMultiplicityElement.xwt45
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt106
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt84
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt106
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt118
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt83
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt82
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt106
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt76
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/plugin.xml175
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/Messages.java114
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/messages.properties28
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/MemberEndModelElement.java284
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferenceInitializer.java42
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferencePage.java91
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferences.java51
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ExtendedMultiplicityDialog.java74
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/MultiplicityDialog.java147
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml26
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityLowerValueDirectEditorConstraint.java67
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java67
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration.java51
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java4
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/AbstractMultiplicityValueSpecificationSetCommand.java110
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityLowerValueSetCommand.java129
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityUpperValueSetCommand.java139
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java6
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ExtendedMultiplicityObservableValue.java85
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/MultiplicityObservableValue.java453
-rw-r--r--tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java645
-rw-r--r--tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java104
-rw-r--r--tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java32
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch85
-rwxr-xr-x[-rw-r--r--]tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java19
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelWizard.java17
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestInitModelWizard.java15
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewModelWizardBase.java16
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewProjectWizard.java5
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java4
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityLowerValueSpecificationGrammarTests.java81
-rw-r--r--tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityUpperValueSpecificationGrammarTests.java81
230 files changed, 17068 insertions, 9766 deletions
diff --git a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt
index afde1ae27a9..c9e45dd834a 100644
--- a/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt
+++ b/examples/uml/org.eclipse.papyrus.uml.textual.editors.example/model/UML/ui/PropertyExample.xwt
@@ -32,7 +32,8 @@
customLabel="defaultEditor"></ppe:ReferenceDialog>
<ppe:CompletionStyledTextReferenceDialog
input="{Binding}" property="UML:TypedElement:type" customLabel="newType"></ppe:CompletionStyledTextReferenceDialog>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
+ <xtexteditor:MultiplicityXTextDialog
+ property="Multiplicity:multiplicity" input="{Binding}"></xtexteditor:MultiplicityXTextDialog>
<ppe:ReferenceDialog input="{Binding}"
property="UML:Property:defaultValue"></ppe:ReferenceDialog>
<xtexteditor:UMLStyledTextReferenceDialog
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
index d03ebdcfae2..a7d88c068ca 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/META-INF/MANIFEST.MF
@@ -15,10 +15,8 @@ Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.cdo.uml.diagram.internal.ui.Acti
- vator
+Bundle-Activator: org.eclipse.papyrus.cdo.uml.diagram.internal.ui.Activator
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.diagram.ui;singleton:
- =true
+Bundle-SymbolicName: org.eclipse.papyrus.cdo.uml.diagram.ui;singleton:=true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Description: %pluginDescription
diff --git a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java
index b125c500137..9b323971238 100644
--- a/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java
+++ b/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui/src/org/eclipse/papyrus/cdo/uml/diagram/internal/ui/wizards/CDONewModelStorageProvider.java
@@ -33,8 +33,8 @@ import org.eclipse.papyrus.cdo.core.IPapyrusRepository;
import org.eclipse.papyrus.cdo.internal.core.CDOUtils;
import org.eclipse.papyrus.cdo.internal.core.PapyrusRepositoryManager;
import org.eclipse.papyrus.uml.diagram.wizards.AbstractNewModelStorageProvider;
-import org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard;
-import org.eclipse.papyrus.uml.diagram.wizards.InitModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
import org.eclipse.swt.widgets.Composite;
import com.google.common.base.Supplier;
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
index 7a7fdfe0daa..d3135f553f4 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/ImportTransformationLauncher.java
@@ -698,6 +698,7 @@ public class ImportTransformationLauncher {
options.put(Transaction.OPTION_NO_UNDO, true);
options.put(Transaction.OPTION_NO_VALIDATION, true);
options.put(Transaction.OPTION_NO_TRIGGERS, true);
+ options.put(Transaction.OPTION_UNPROTECTED, true);
// We're in a batch environment, with no undo/redo support. Run a vanilla transaction to improve performances
Transaction fastTransaction = internalDomain.startTransaction(false, options);
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
index f13de92d7e1..db122ffe79f 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
@@ -78,7 +78,7 @@ public class RepairStereotypes {
* Finds all zombie stereotypes, and repair them with the default action.
*
* If the profile can't be found automatically, the profileMappings map is used
- *
+ *
* @throws InterruptedException
* @throws RollbackException
*/
@@ -97,13 +97,13 @@ public class RepairStereotypes {
for (Resource resource : resourcesToRepair) {
Element rootElement = (Element) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.ELEMENT);
-
- if (rootElement == null || rootElement.getNearestPackage() == null){
+
+ if (rootElement == null || rootElement.getNearestPackage() == null) {
continue;
}
-
+
Package rootPackage = rootElement.getNearestPackage();
-
+
Collection<ProfileApplication> profileApplications = Lists.newArrayList();
for (TreeIterator<EObject> iter = EcoreUtil.getAllProperContents(Collections.singleton(rootPackage), false); iter.hasNext();) {
EObject next = iter.next();
@@ -145,6 +145,7 @@ public class RepairStereotypes {
options.put(Transaction.OPTION_NO_UNDO, true);
options.put(Transaction.OPTION_NO_VALIDATION, true);
options.put(Transaction.OPTION_NO_TRIGGERS, true);
+ options.put(Transaction.OPTION_UNPROTECTED, true);
// We're in a batch environment, with no undo/redo support. Run a vanilla transaction to improve performances
Transaction fastTransaction = internalDomain.startTransaction(false, options);
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlModelWizard.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlModelWizard.java
index 69d92a15111..ab02794cf67 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlModelWizard.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlModelWizard.java
@@ -71,4 +71,8 @@ public class NewRobotmlModelWizard extends CreateModelWizard {
// here RobotML is the only available category
}
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
}
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlProjectWizard.java b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlProjectWizard.java
index 476eea946ea..b04014872cb 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlProjectWizard.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui/src/org/eclipse/papyrus/robotml/diagram/ui/NewRobotmlProjectWizard.java
@@ -69,5 +69,9 @@ public class NewRobotmlProjectWizard extends NewPapyrusProjectWizard {
return new String[] { CreateRobotmlModelCommand.COMMAND_ID };
}
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
index 80131cb47bb..e61c2bc8a30 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/META-INF/MANIFEST.MF
@@ -1,27 +1,26 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.papyrus.umlrt.ui;singleton:=true
-Export-Package: org.eclipse.papyrus.umlrt.ui
+Export-Package: org.eclipse.papyrus.umlrt.ui,org.eclipse.papyrus.umlrt
+ .ui.provider,org.eclipse.papyrus.umlrt.ui.queries
Bundle-Name: UML-RT UI plugin
Bundle-Version: 1.1.0.qualifier
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.umlrt;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.newchild;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.elementtypesconfigurations;bundle-version="1.1.0",
- org.eclipse.emf.ecore,
- org.eclipse.uml2.uml,
- org.eclipse.papyrus.emf.facet.efacet.core;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="1.1.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0"
+Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime,org.eclipse.pa
+ pyrus.uml.diagram.common;bundle-version="1.1.0",org.eclipse.papyrus.u
+ mlrt;bundle-version="1.1.0",org.eclipse.papyrus.infra.newchild;bundle
+ -version="1.1.0",org.eclipse.papyrus.infra.elementtypesconfigurations
+ ;bundle-version="1.1.0",org.eclipse.emf.ecore,org.eclipse.uml2.uml,or
+ g.eclipse.papyrus.emf.facet.efacet.core;bundle-version="1.1.0",org.ec
+ lipse.papyrus.emf.facet.query.java.core;bundle-version="1.1.0",org.ec
+ lipse.papyrus.uml.tools;bundle-version="1.1.0",org.eclipse.papyrus.in
+ fra.emf;bundle-version="1.1.0",org.eclipse.papyrus.emf.facet.custom.m
+ etamodel;bundle-version="1.1.0",org.eclipse.gmf.runtime.emf.type.core
+ ;bundle-version="1.9.0",org.eclipse.papyrus.infra.core.log;bundle-ver
+ sion="1.1.0",org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="
+ 1.1.0",org.eclipse.papyrus.infra.services.labelprovider;bundle-versio
+ n="1.1.0",org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1
+ .1.0",org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",org.ec
+ lipse.papyrus.uml.modelexplorer;bundle-version="1.1.0",org.eclipse.pa
+ pyrus.views.modelexplorer;bundle-version="1.1.0"
Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.umlrt.ui.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/Protocol.custom b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/Protocol.custom
index e64f482049b..3bb6d1bd92d 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/Protocol.custom
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/Protocol.custom
@@ -14,9 +14,9 @@
rank="-1">
<eClassifiers
xsi:type="efacet:Facet"
- name="ProtocolContainerAsAProtocol"
+ name="ProtocolContainerFacet"
documentation="This element represents the Package stereotyped PackageContainer as protocol definition"
- conformanceTypedElement="//ProtocolContainerAsAProtocol/isProtocolContainer">
+ conformanceTypedElement="//ProtocolContainerFacet/isProtocolContainer">
<extendedMetaclass
href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
<facetOperations
@@ -31,131 +31,116 @@
</facetOperations>
</eClassifiers>
<eClassifiers
- xsi:type="custom:EClassCustomization"
- name="ProtocolContainerAsMainProtocolEntry"
- documentation="Customize the display of a Protocol Container as a Protocol definition"
- conformanceTypedElement="//ProtocolContainerAsAProtocol/isProtocolContainer">
+ xsi:type="efacet:Facet"
+ name="ProtocolContainerContainersFacet"
+ documentation="This element represents the Packages that contain ProtocolContainers">
<extendedMetaclass
href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
<facetOperations
- name="GetProtocolImage">
+ name="isProtocolContainersContainer">
<eType
xsi:type="ecore:EDataType"
- href="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom_primitive_types#//Image"/>
- <eParameters
- name="eObject">
- <eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </eParameters>
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<query
xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetProtocolImageQuery"/>
- <override
- xsi:type="efacet:FacetOperation"
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/image"/>
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.IsProtocolContainersContainerQuery"/>
</facetOperations>
- <extendedFacets
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
</eClassifiers>
<eClassifiers
xsi:type="custom:FacetCustomization"
- name="ProtocolContainer_MessagesContainer"
- documentation="Representation of the operations contained in the &quot;In&quot; Interface holder"
- extendedFacets="//ProtocolContainerAsAProtocol"
- customizedFacet="//ProtocolContainerAsAProtocol">
+ name="ProtocolContainerHidden"
+ documentation="hide the protocol containers from their parent package"
+ extendedFacets="//ProtocolContainerContainersFacet">
<facetElements
xsi:type="efacet:FacetReference"
- name="in"
- lowerBound="-1"
+ name="filteredPackagedElements"
upperBound="-1"
derived="true"
- documentation="Representation of all the operations for the given protocol, direction in">
+ documentation="Representation of the packaged Elements, replacing protocolcontainers by protocols">
<eType
xsi:type="ecore:EClass"
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ href="http://www.eclipse.org/uml2/5.0.0/UML#//PackageableElement"/>
<query
xsi:type="query:OperationCallQuery"
- operation="//ProtocolContainer_MessagesContainer/GetMessageInFromProtocolContainer"/>
+ operation="//ProtocolContainerHidden/GetFilteredProtocolsPackageElements"/>
</facetElements>
- <facetElements
- xsi:type="efacet:FacetReference"
- name="out"
- lowerBound="-1"
- upperBound="-1"
- derived="true"
- documentation="Representation of all the operations for the given protocol, direction out">
- <eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
- <query
- xsi:type="query:OperationCallQuery"
- operation="//ProtocolContainer_MessagesContainer/GetMessageOutFromProtocolContainer"/>
- </facetElements>
- <facetElements
- xsi:type="efacet:FacetReference"
- name="inout"
- lowerBound="-1"
- upperBound="-1"
- derived="true"
- documentation="Representation of all the operations for the given protocol, both direction">
+ <facetOperations
+ name="HideProtocolContainers">
<eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eParameters
+ name="eStructuralFeature">
+ <eType
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
+ </eParameters>
<query
- xsi:type="query:OperationCallQuery"
- operation="//ProtocolContainer_MessagesContainer/GetMessageInOutFromProtocolContainer"/>
- </facetElements>
+ xsi:type="javaQuery:JavaQuery"
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.HideProtocolContainersQuery"/>
+ <override
+ xsi:type="efacet:FacetOperation"
+ href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ </facetOperations>
<facetOperations
- name="GetMessageInFromProtocolContainer"
+ name="GetFilteredProtocolsPackageElements"
upperBound="-1">
<eType
xsi:type="ecore:EClass"
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ href="http://www.eclipse.org/uml2/5.0.0/UML#//PackageableElement"/>
<query
xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetMessageInFromProtocolContainerQuery"/>
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetFilteredProtocolsPackageElementsQuery"/>
</facetOperations>
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="efacet:Facet"
+ name="ProtocolFacet"
+ documentation="Facet that represents Protocol Collaboration as the main holder for RT protocols">
+ <extendedMetaclass
+ href="http://www.eclipse.org/uml2/5.0.0/UML#//Collaboration"/>
<facetOperations
- name="GetMessageOutFromProtocolContainer"
- upperBound="-1">
+ name="isProtocol">
<eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ xsi:type="ecore:EDataType"
+ href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<query
xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetMessageOutFromProtocolContainerQuery"/>
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.IsProtocolQuery"/>
</facetOperations>
- <facetOperations
- name="GetMessageInOutFromProtocolContainer"
- upperBound="-1">
+ </eClassifiers>
+ <eClassifiers
+ xsi:type="custom:FacetCustomization"
+ name="ProtocolContainment_OnlyRTMessages"
+ documentation="Display RTMessages under the protocol and nothing else"
+ extendedFacets="//ProtocolFacet">
+ <facetElements
+ xsi:type="efacet:FacetReference"
+ name="in"
+ upperBound="-1"
+ volatile="true"
+ transient="true"
+ derived="true">
<eType
xsi:type="ecore:EClass"
href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
<query
- xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetMessageInOutFromProtocolContainerQuery"/>
- </facetOperations>
+ xsi:type="query:OperationCallQuery"
+ operation="//ProtocolContainment_OnlyRTMessages/GetRTMessagesIn"/>
+ </facetElements>
<facetOperations
- name="DisplayMessageSetsOnly">
+ name="GetRTMessagesIn"
+ upperBound="-1"
+ documentation="Returns all Messages from the IN MessageSets">
<eType
- xsi:type="ecore:EDataType"
- href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eParameters
- name="eStructuralFeature">
- <eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/emf/2002/Ecore#//EStructuralFeature"/>
- </eParameters>
+ xsi:type="ecore:EClass"
+ href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
<query
xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.DisplayMessageSetsOnlyQuery"/>
- <override
- xsi:type="efacet:FacetOperation"
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetRTMessagesInQuery"/>
</facetOperations>
<facetOperations
- name="NotCollapseMessageSets">
+ name="DisplayMessageSetsOnly">
<eType
xsi:type="ecore:EDataType"
href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
@@ -167,10 +152,10 @@
</eParameters>
<query
xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.NotCollapseMessageSetQuery"/>
+ implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.DisplayMessagesOnlyQuery"/>
<override
xsi:type="efacet:FacetOperation"
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/collapseLink"/>
+ href="platform:/plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/isVisible"/>
</facetOperations>
</eClassifiers>
</custom:Customization>
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/SimpleUMLRT.custom b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/SimpleUMLRT.custom
index dcd4c17f919..76ff4a53c90 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/SimpleUMLRT.custom
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/facet/SimpleUMLRT.custom
@@ -1,38 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
-<custom:Customization
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet"
- xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery"
- name="simpleUMLRT"
- documentation="Display structure of a UML-RT model">
- <eClassifiers
- xsi:type="custom:EClassCustomization"
- name="Element">
- <extendedMetaclass
- href="http://www.eclipse.org/uml2/5.0.0/UML#//Element"/>
- <facetOperations
- name="GetLabel">
- <eType
- xsi:type="ecore:EDataType"
- href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eParameters
- name="eObject">
- <eType
- xsi:type="ecore:EClass"
- href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+<custom:Customization xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:custom="http://www.eclipse.org/papyrus/emf/facet/custom/0.2.incubation/custom" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:efacet="http://www.eclipse.org/papyrus/emf/facet/efacet/0.2.incubation/efacet" xmlns:javaQuery="http://www.eclipse.org/papyrus/emf/facet/query/java/0.2.incubation/javaquery" name="simpleUMLRT" documentation="Display structure of a UML-RT model">
+ <eClassifiers xsi:type="custom:EClassCustomization" name="Element">
+ <extendedMetaclass href="http://www.eclipse.org/uml2/5.0.0/UML#//Element"/>
+ <facetOperations name="GetLabel">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eParameters name="eObject">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eParameters>
- <query
- xsi:type="javaQuery:JavaQuery"
- implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetLabelQuery"/>
- <override
- xsi:type="efacet:FacetOperation"
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
+ <query xsi:type="javaQuery:JavaQuery" implementationClassName="org.eclipse.papyrus.umlrt.ui.queries.GetLabelQuery"/>
+ <override xsi:type="efacet:FacetOperation" href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject/label"/>
</facetOperations>
- <extendedFacets
- href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
+ <extendedFacets href="../../../plugin/org.eclipse.papyrus.emf.facet.custom.ui/resources/customproperties.efacet#//CustomizedEObject"/>
</eClassifiers>
</custom:Customization>
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_in.gif b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_in.gif
new file mode 100644
index 00000000000..19567890aa8
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_in.gif
Binary files differ
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_inout.gif b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_inout.gif
new file mode 100644
index 00000000000..d22392de13e
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_inout.gif
Binary files differ
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_out.gif b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_out.gif
new file mode 100644
index 00000000000..4fb41501036
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_out.gif
Binary files differ
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_undefined.gif b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_undefined.gif
new file mode 100644
index 00000000000..486faff8aac
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/icons/rt_message_undefined.gif
Binary files differ
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/newchildmenu/newChildMenu.xmi b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/newchildmenu/newChildMenu.xmi
index d4c241bd866..83878d81d7b 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/newchildmenu/newChildMenu.xmi
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/newchildmenu/newChildMenu.xmi
@@ -30,6 +30,6 @@
label="RTMessageSet"
elementTypeIdRef="org.eclipse.papyrus.umlrt.RTMessageSet"/>
<menu xsi:type="ElementCreationMenuModel:CreationMenu"
- label="In Message"
- elementTypeIdRef="org.eclipse.papyrus.umlrt.OperationAsMessageIn"/>
+ label="IN RTMessage "
+ elementTypeIdRef="org.eclipse.papyrus.umlrt.RTMessageIn"/>
</ElementCreationMenuModel:Folder>
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/plugin.xml b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/plugin.xml
index a7f15b9b660..841d8e46318 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/plugin.xml
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/plugin.xml
@@ -48,6 +48,12 @@
<extension
point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
<modeldeclaration
+ file="facet/Protocol.custom">
+ </modeldeclaration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
+ <modeldeclaration
file="facet/SimpleUMLRT.custom">
</modeldeclaration>
</extension>
@@ -58,11 +64,5 @@
provider="org.eclipse.papyrus.umlrt.ui.provider.UMLRTFilteredLabelProvider">
</labelProvider>
</extension>
- <extension
- point="org.eclipse.papyrus.emf.facet.util.emf.core.modeldeclaration">
- <modeldeclaration
- file="facet/Protocol.custom">
- </modeldeclaration>
- </extension>
</plugin>
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/provider/UMLRTFilteredLabelProvider.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/provider/UMLRTFilteredLabelProvider.java
index 7d9597927a7..36c4669a6a1 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/provider/UMLRTFilteredLabelProvider.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/provider/UMLRTFilteredLabelProvider.java
@@ -17,6 +17,7 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.jface.viewers.ILabelProviderListener;
@@ -26,7 +27,7 @@ import org.eclipse.papyrus.uml.tools.providers.UMLLabelProvider;
import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes;
import org.eclipse.papyrus.umlrt.custom.UMLRTElementTypesEnumerator;
-import org.eclipse.papyrus.umlrt.custom.utils.MessageSetUtils;
+import org.eclipse.papyrus.umlrt.custom.utils.RTMessageUtils;
import org.eclipse.papyrus.umlrt.ui.Activator;
import org.eclipse.swt.graphics.Image;
import org.eclipse.uml2.uml.Element;
@@ -41,10 +42,10 @@ public class UMLRTFilteredLabelProvider implements IFilteredLabelProvider {
/** path to the icons in the plugin */
protected static String ICON_PATH = "/icons/";
- protected static String RT_MESSAGE_SET_IN_ICON = ICON_PATH + "rt_messageset_in.gif";//$NON-NLS-1$
- protected static String RT_MESSAGE_SET_IN_OUT_ICON = ICON_PATH + "rt_messageset_inout.gif";//$NON-NLS-1$
- protected static String RT_MESSAGE_SET_OUT_ICON = ICON_PATH + "rt_messageset_out.gif";//$NON-NLS-1$
- protected static String RT_MESSAGE_SET_UNDEFINED_ICON = ICON_PATH + "rt_messageset_undefined.gif";//$NON-NLS-1$
+ protected static String RT_MESSAGE_IN_ICON = ICON_PATH + "rt_message_in.gif";//$NON-NLS-1$
+ protected static String RT_MESSAGE_IN_OUT_ICON = ICON_PATH + "rt_message_inout.gif";//$NON-NLS-1$
+ protected static String RT_MESSAGE_OUT_ICON = ICON_PATH + "rt_message_out.gif";//$NON-NLS-1$
+ protected static String RT_MESSAGE_UNDEFINED_ICON = ICON_PATH + "rt_message_undefined.gif";//$NON-NLS-1$
/**
* Default constructor
@@ -75,9 +76,15 @@ public class UMLRTFilteredLabelProvider implements IFilteredLabelProvider {
for (IElementType type : UMLRTElementTypesEnumerator.getAllRTTypes()) {
if (type instanceof ISpecializationType) {
- if(((ISpecializationType) type).getMatcher().matches(semanticObject)) {
- return true;
+ IElementMatcher matcher = ((ISpecializationType) type).getMatcher();
+ if (matcher != null) {
+ if (((ISpecializationType) type).getMatcher().matches(semanticObject)) {
+ return true;
+ }
+ } else {
+ Activator.log.debug("no matcher for this element type: " + type);
}
+
}
}
@@ -106,31 +113,51 @@ public class UMLRTFilteredLabelProvider implements IFilteredLabelProvider {
Image image = null;
// a match was done. give a different icon given the value
switch (matchingTypeMatcher) {
- case IUMLRTElementTypes.RT_MESSAGE_SET_ID:
+// case IUMLRTElementTypes.RT_MESSAGE_SET_ID:
+// // for RT message, direction can give different icons
+//
+// // the element has the RT messageset stereotype applied. It should be possible to retrieve it and even better the direction
+// RTMessageKind kind = MessageSetUtils.getMessageKind(semanticObject);
+// if (kind != null) {
+// switch (kind) {
+// case IN:
+// image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_IN_ICON);
+// break;
+// case OUT:
+// image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_OUT_ICON);
+// break;
+// case IN_OUT:
+// image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_IN_OUT_ICON);
+// break;
+// default:
+// image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_UNDEFINED_ICON);
+// break;
+// }
+// break;
+// }
+// image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_UNDEFINED_ICON);
+// break;
+ case IUMLRTElementTypes.RT_MESSAGE_ID:
// for RT message, direction can give different icons
- // the element has the RT messageset stereotype applied. It should be possible to retrieve it and even better the direction
- RTMessageKind kind = MessageSetUtils.getMessageKind(semanticObject);
+ RTMessageKind kind = RTMessageUtils.getMessageKind(semanticObject);
if (kind != null) {
switch (kind) {
case IN:
- image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_IN_ICON);
+ image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_IN_ICON);
break;
case OUT:
- image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_OUT_ICON);
+ image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_OUT_ICON);
break;
case IN_OUT:
- image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_IN_OUT_ICON);
+ image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_IN_OUT_ICON);
break;
default:
- image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_UNDEFINED_ICON);
+ image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_UNDEFINED_ICON);
break;
}
break;
}
- image = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage(Activator.PLUGIN_ID, RT_MESSAGE_SET_UNDEFINED_ICON);
- break;
-
default:
image = getElementImage(matchingTypeMatcher, semanticObject);
break;
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/DisplayMessagesOnlyQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/DisplayMessagesOnlyQuery.java
new file mode 100644
index 00000000000..c0531887cb9
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/DisplayMessagesOnlyQuery.java
@@ -0,0 +1,35 @@
+package org.eclipse.papyrus.umlrt.ui.queries;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.FacetReference;
+import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterValue;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.uml2.uml.Collaboration;
+
+public class DisplayMessagesOnlyQuery implements IJavaQuery2<Collaboration, Boolean> {
+
+ public Boolean evaluate(final Collaboration context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+
+ // display only in / out and inout features. They should not be collapsed also
+ ParameterValue parameterValue = parameterValues.getParameterValueByName("eStructuralFeature");
+ if (parameterValue == null) {
+ return false;
+ }
+ EStructuralFeature eStructuralFeature = (EStructuralFeature) parameterValue.getValue();
+ // the eStructure is a containmentReference or Facet Reference?
+ if (eStructuralFeature instanceof FacetReference) {
+ // check this is in / out or inout
+ String name = ((FacetReference)eStructuralFeature).getName();
+ if("in".equals(name) || "out".equals(name) || "inout".equals(name) ) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetFilteredProtocolsPackageElementsQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetFilteredProtocolsPackageElementsQuery.java
new file mode 100644
index 00000000000..b44fdb4b35e
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetFilteredProtocolsPackageElementsQuery.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.ui.queries;
+
+import java.util.List;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.umlrt.custom.utils.ProtocolContainerUtils;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.PackageableElement;
+
+/**
+ * query operation to return the list of packaged elements, but replace protocol containers by protocols
+ */
+public class GetFilteredProtocolsPackageElementsQuery implements IJavaQuery2<Element, List<PackageableElement>> {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public List<PackageableElement> evaluate(Element source, IParameterValueList2 parameterValues, IFacetManager facetManager) throws DerivedTypedElementException {
+ return ProtocolContainerUtils.getFilteredPackagedElements(source);
+ }
+
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInFromProtocolContainerQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInFromProtocolContainerQuery.java
index 1b3c164d7f0..b247c100606 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInFromProtocolContainerQuery.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInFromProtocolContainerQuery.java
@@ -27,6 +27,6 @@ public class GetMessageInFromProtocolContainerQuery implements IJavaQuery2<Packa
final IParameterValueList2 parameterValues,
final IFacetManager facetManager)
throws DerivedTypedElementException {
- return ProtocolContainerUtils.getAllInOperations(context);
+ return ProtocolContainerUtils.getAllInRTMessages(context);
}
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInOutFromProtocolContainerQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInOutFromProtocolContainerQuery.java
index 727d41b3e5f..1fb5303ed88 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInOutFromProtocolContainerQuery.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageInOutFromProtocolContainerQuery.java
@@ -27,6 +27,6 @@ public class GetMessageInOutFromProtocolContainerQuery implements IJavaQuery2<Pa
final IParameterValueList2 parameterValues,
final IFacetManager facetManager)
throws DerivedTypedElementException {
- return ProtocolContainerUtils.getAllInOutOperations(context);
+ return ProtocolContainerUtils.getAllInOutRTMessages(context);
}
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageOutFromProtocolContainerQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageOutFromProtocolContainerQuery.java
index e674be711b1..aab7b5977d7 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageOutFromProtocolContainerQuery.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetMessageOutFromProtocolContainerQuery.java
@@ -27,6 +27,6 @@ public class GetMessageOutFromProtocolContainerQuery implements IJavaQuery2<Pack
final IParameterValueList2 parameterValues,
final IFacetManager facetManager)
throws DerivedTypedElementException {
- return ProtocolContainerUtils.getAllOutOperations(context);
+ return ProtocolContainerUtils.getAllOutRTMessages(context);
}
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetRTMessagesInQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetRTMessagesInQuery.java
new file mode 100644
index 00000000000..1a6d9d83e90
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/GetRTMessagesInQuery.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.ui.queries;
+
+import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.uml2.uml.Operation;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
+import org.eclipse.papyrus.umlrt.custom.utils.ProtocolUtils;
+
+public class GetRTMessagesInQuery implements IJavaQuery2<EObject, List<Operation>> {
+ public List<Operation> evaluate(final EObject context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+ if (context instanceof Collaboration) {
+ return ProtocolUtils.getRTMessages((Collaboration) context, RTMessageKind.IN, true);
+ }
+ return null;
+ }
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/HideProtocolContainersQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/HideProtocolContainersQuery.java
new file mode 100644
index 00000000000..dafd13372a9
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/HideProtocolContainersQuery.java
@@ -0,0 +1,50 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.ui.queries;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.efacet.metamodel.v0_2_0.efacet.ParameterValue;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.uml.modelexplorer.queries.DisplayUMLStructuralFeature;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.UMLPackage;
+
+public class HideProtocolContainersQuery extends DisplayUMLStructuralFeature implements IJavaQuery2<EObject, Boolean> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean evaluate(final EObject context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+
+ ParameterValue parameterValue = parameterValues.getParameterValueByName("eStructuralFeature");
+ EStructuralFeature eStructuralFeature = (EStructuralFeature) parameterValue.getValue();
+ // This is an UML element?
+ if (parameterValue != null && context instanceof Element) {
+ // the eStructure is a containmentReference or Facet Reference?
+ if (eStructuralFeature instanceof EReference) {
+ if (UMLPackage.eINSTANCE.getPackage_PackagedElement().equals(eStructuralFeature)) {
+ return false;
+ }
+ }
+ }
+ return super.evaluate(context, parameterValues, facetManager);
+ }
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainerQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainerQuery.java
index c26240a8daa..b9a750d8392 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainerQuery.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainerQuery.java
@@ -12,14 +12,11 @@
*****************************************************************************/
package org.eclipse.papyrus.umlrt.ui.queries;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
-import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes;
+import org.eclipse.papyrus.umlrt.custom.utils.ProtocolContainerUtils;
import org.eclipse.uml2.uml.Package;
public class IsProtocolContainerQuery implements IJavaQuery2<Package, Boolean> {
@@ -32,14 +29,6 @@ public class IsProtocolContainerQuery implements IJavaQuery2<Package, Boolean> {
final IFacetManager facetManager)
throws DerivedTypedElementException {
- // check the package is a protocol container
- IElementType type = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.PROTOCOL_CONTAINER_ID);
-
- if(type instanceof ISpecializationType) { // check at the same time UMLRT element types are correctly loaded
- return ((ISpecializationType) type).getMatcher().matches(context);
- }
-
- // by default, assumes the element is not a protocol container
- return false;
+ return ProtocolContainerUtils.isProtocolContainer(context);
}
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainersContainerQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainersContainerQuery.java
new file mode 100644
index 00000000000..7793d1a40cb
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolContainersContainerQuery.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.ui.queries;
+
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.umlrt.custom.utils.ProtocolContainerUtils;
+import org.eclipse.uml2.uml.Package;
+
+public class IsProtocolContainersContainerQuery implements IJavaQuery2<Package, Boolean> {
+
+ public Boolean evaluate(final Package context, final IParameterValueList2 parameterValues, final IFacetManager facetManager) throws DerivedTypedElementException {
+ return ProtocolContainerUtils.containsProtocolContainer(context);
+ }
+}
+
+
+
+
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolQuery.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolQuery.java
new file mode 100644
index 00000000000..47fe6c0b929
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.ui/src/org/eclipse/papyrus/umlrt/ui/queries/IsProtocolQuery.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.ui.queries;
+
+import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.papyrus.emf.facet.efacet.core.IFacetManager;
+import org.eclipse.papyrus.emf.facet.efacet.core.exception.DerivedTypedElementException;
+import org.eclipse.papyrus.emf.facet.query.java.core.IJavaQuery2;
+import org.eclipse.papyrus.emf.facet.query.java.core.IParameterValueList2;
+import org.eclipse.papyrus.umlrt.custom.utils.ProtocolUtils;
+
+public class IsProtocolQuery implements IJavaQuery2<Collaboration, Boolean> {
+
+ /**
+ * {@inheritDoc}
+ */
+ public Boolean evaluate(final Collaboration context,
+ final IParameterValueList2 parameterValues,
+ final IFacetManager facetManager)
+ throws DerivedTypedElementException {
+ return ProtocolUtils.isProtocol(context);
+ }
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTModelWizard.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTModelWizard.java
index d2aae0c4e64..1feeab7794d 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTModelWizard.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTModelWizard.java
@@ -42,6 +42,11 @@ public class NewUMLRTModelWizard extends CreateModelWizard {
return new String[] { CreateUMLRTModelCommand.COMMAND_ID };
}
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTProjectWizard.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTProjectWizard.java
index ceb6b04d5e8..ed5db0e5ab1 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTProjectWizard.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard/src/org/eclipse/papyrus/umlrt/wizard/ui/NewUMLRTProjectWizard.java
@@ -68,4 +68,8 @@ public class NewUMLRTProjectWizard extends NewPapyrusProjectWizard {
return new String[] { CreateUMLRTModelCommand.COMMAND_ID };
}
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.elementtypesconfigurations b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.elementtypesconfigurations
index 9c6ecf3130c..93893ccb1d2 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.elementtypesconfigurations
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.elementtypesconfigurations
@@ -160,8 +160,8 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_At0JAONwEeSMDu6IBsn9eg"
- name="Operation"
- identifier="org.eclipse.papyrus.umlrt.OperationAsMessage">
+ name="RTMessage"
+ identifier="org.eclipse.papyrus.umlrt.RTMessage">
<iconEntry
xmi:id="_At0JAeNwEeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
@@ -174,17 +174,20 @@
identifier="org.eclipse.papyrus.umlrt.custom.advice.OperationAsMessageEditHelperAdvice"
editHelperAdviceClassName="org.eclipse.papyrus.umlrt.custom.advice.OperationAsMessageEditHelperAdvice"
inheritance="all"/>
+ <matcherConfiguration
+ xmi:id="_OPE2wOqQEeS-F5lSZrhlvg"
+ matcherClassName="org.eclipse.papyrus.umlrt.custom.advice.RTMessageMatcher"/>
</elementTypeConfigurations>
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_1puuMOToEeSW0_lDigZ13g"
- name="Operation As Message IN"
- identifier="org.eclipse.papyrus.umlrt.OperationAsMessageIn">
+ name="RTMessageIN"
+ identifier="org.eclipse.papyrus.umlrt.RTMessageIn">
<iconEntry
xmi:id="_7aYeMOToEeSW0_lDigZ13g"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<editHelperAdviceConfiguration
xmi:id="_7aZFQOToEeSW0_lDigZ13g"
name="org.eclipse.papyrus.umlrt.custom.advice.OperationAsMessageInEditHelperAdvice"
@@ -192,6 +195,9 @@
identifier="org.eclipse.papyrus.umlrt.custom.advice.OperationAsMessageInEditHelperAdvice"
editHelperAdviceClassName="org.eclipse.papyrus.umlrt.custom.advice.OperationAsMessageInEditHelperAdvice"
inheritance="all"/>
+ <matcherConfiguration
+ xmi:id="_PLPkEOqQEeS-F5lSZrhlvg"
+ matcherClassName="org.eclipse.papyrus.umlrt.custom.advice.RTMessageInMatcher"/>
</elementTypeConfigurations>
<adviceBindingsConfigurations
xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.umlclassdiagram.elementtypesconfigurations b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.umlclassdiagram.elementtypesconfigurations
index 0c75acb2097..d59635dd174 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.umlclassdiagram.elementtypesconfigurations
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/elementtypes/uml-rt.umlclassdiagram.elementtypesconfigurations
@@ -451,7 +451,7 @@
xmi:id="_UKFsweN2EeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Operation_3003</specializedTypesID>
<matcherConfiguration
xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
@@ -469,7 +469,7 @@
xmi:id="_iggYseN2EeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Operation_3007</specializedTypesID>
<matcherConfiguration
xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
@@ -487,7 +487,7 @@
xmi:id="_nR6SMeN2EeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Operation_3013</specializedTypesID>
<matcherConfiguration
xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
@@ -505,7 +505,7 @@
xmi:id="_sqMlgeN2EeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Operation_3019</specializedTypesID>
<matcherConfiguration
xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
@@ -523,7 +523,7 @@
xmi:id="_xQYGceN2EeSMDu6IBsn9eg"
iconPath="/icons/full/obj16/Operation.gif"
bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.umlrt.OperationAsMessage</specializedTypesID>
+ <specializedTypesID>org.eclipse.papyrus.umlrt.RTMessage</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Operation_3042</specializedTypesID>
<matcherConfiguration
xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/IUMLRTElementTypes.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/IUMLRTElementTypes.java
index 0814eabe2ab..ef93ca750ab 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/IUMLRTElementTypes.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/IUMLRTElementTypes.java
@@ -33,5 +33,8 @@ public interface IUMLRTElementTypes {
public static final String RT_EXCLUDED_ELEMENT_ID = "org.eclipse.papyrus.umlrt.RTRExcludedElement";//$NON-NLS-1$
- public static final String RT_OPERATION_AS_MESSAGE = "org.eclipse.papyrus.umlrt.OperationAsMessage";
+ public static final String RT_MESSAGE_ID = "org.eclipse.papyrus.umlrt.RTMessage";
+ public static final String RT_MESSAGE_IN_ID = "org.eclipse.papyrus.umlrt.RTMessageIn";
+ public static final String RT_MESSAGE_OUT_ID = "org.eclipse.papyrus.umlrt.RTMessageOut";
+ public static final String RT_MESSAGE_INOUT_ID = "org.eclipse.papyrus.umlrt.RTMessageInout";
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/UMLRTElementTypesEnumerator.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/UMLRTElementTypesEnumerator.java
index 000a1bf2340..db4723b61bc 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/UMLRTElementTypesEnumerator.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/UMLRTElementTypesEnumerator.java
@@ -39,7 +39,13 @@ public class UMLRTElementTypesEnumerator extends AbstractElementTypeEnumerator i
public static final IHintedType RT_EXCLUDED_ELEMENT = (IHintedType) getElementType(RT_EXCLUDED_ELEMENT_ID);
- private static final List<IHintedType> rtTypes = Arrays.asList(RT_MESSAGE_SET, PROTOCOL_CONTAINER, PROTOCOL, CAPSULE, CAPSULE_PART, RT_PORT, RT_CONNECTOR, RT_EXCLUDED_ELEMENT);
+ public static final IHintedType RT_MESSAGE = (IHintedType) getElementType(RT_MESSAGE_ID);
+ public static final IHintedType RT_MESSAGE_IN = (IHintedType) getElementType(RT_MESSAGE_IN_ID);
+ // public static final IHintedType RT_MESSAGE_OUT = (IHintedType) getElementType(RT_MESSAGE_OUT_ID);
+ // public static final IHintedType RT_MESSAGE_INOUT = (IHintedType) getElementType(RT_MESSAGE_INOUT_ID);
+
+
+ private static final List<IHintedType> rtTypes = Arrays.asList(RT_MESSAGE_SET, PROTOCOL_CONTAINER, PROTOCOL, CAPSULE, CAPSULE_PART, RT_PORT, RT_CONNECTOR, RT_EXCLUDED_ELEMENT, RT_MESSAGE, RT_MESSAGE_IN);
/**
* Returns all the specific semantic element types for UML-RT
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/BehavioredClassifierEditHelperAdvice.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/BehavioredClassifierEditHelperAdvice.java
index 82e7a317a98..0d560d8799b 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/BehavioredClassifierEditHelperAdvice.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/BehavioredClassifierEditHelperAdvice.java
@@ -42,10 +42,10 @@ public class BehavioredClassifierEditHelperAdvice extends AbstractEditHelperAdvi
IElementType type = createElementRequest.getElementType();
// type should only be compatible with UMLRT::OperationAsMessages
- IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_OPERATION_AS_MESSAGE);
+ IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_MESSAGE_ID);
// should not be null, otherwise, element type model is not loaded correctly. abort.
if (umlRTMessageType == null) {
- Activator.log.debug("MessageAsOperation element type is not accessible");
+ Activator.log.debug("RTMessage element type is not accessible");
return super.approveRequest(request);
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java
index 749fa43fa46..3c359824a3e 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/MessageSetEditHelperAdvice.java
@@ -17,6 +17,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
@@ -31,6 +32,7 @@ import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes;
import org.eclipse.papyrus.umlrt.custom.utils.MessageUtils;
import org.eclipse.papyrus.umlrt.internals.Activator;
import org.eclipse.uml2.uml.CallEvent;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Operation;
@@ -47,6 +49,35 @@ public class MessageSetEditHelperAdvice extends AbstractEditHelperAdvice {
return super.getAfterEditContextCommand(request);
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected ICommand getAfterMoveCommand(final MoveRequest request) {
+ CompositeCommand compositeMoveCommand = new CompositeCommand("Composite Move Command");
+
+ Map<?, ?> elementsToMove = request.getElementsToMove();
+ if (!elementsToMove.isEmpty()) {
+ for (Object elementToMove : elementsToMove.keySet()) {
+ if (elementToMove instanceof Operation) {
+ final Operation operation = (Operation) elementToMove;
+ final CallEvent callEvent = MessageUtils.getCallEvent(operation);
+ if (callEvent != null) {
+ MoveElementsCommand command = MessageUtils.createMoveCallEventCommand(request, callEvent);
+ compositeMoveCommand.add(command);
+ }
+ }
+ }
+ }
+
+ if (compositeMoveCommand.isEmpty()) {
+ compositeMoveCommand.add(super.getAfterMoveCommand(request));
+ }
+
+ return compositeMoveCommand;
+ }
+
/**
* {@inheritDoc}
*/
@@ -60,10 +91,10 @@ public class MessageSetEditHelperAdvice extends AbstractEditHelperAdvice {
IElementType type = createElementRequest.getElementType();
// type should only be compatible with UMLRT::OperationAsMessages
- IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_OPERATION_AS_MESSAGE);
+ IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_MESSAGE_ID);
// should not be null, otherwise, element type model is not loaded correctly. abort.
if (umlRTMessageType == null) {
- Activator.log.debug("MessageAsOperation element type is not accessible");
+ Activator.log.debug("RTMessage element type is not accessible");
return super.approveRequest(request);
}
@@ -78,33 +109,16 @@ public class MessageSetEditHelperAdvice extends AbstractEditHelperAdvice {
}
/**
- * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterMoveCommand(org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest)
- *
- * @param request
- * @return
+ * {@inheritDoc}
*/
@Override
- protected ICommand getAfterMoveCommand(final MoveRequest request) {
- CompositeCommand compositeMoveCommand = new CompositeCommand("Composite Move Command");
-
- Map<?, ?> elementsToMove = request.getElementsToMove();
- if (!elementsToMove.isEmpty()) {
- for (Object elementToMove : elementsToMove.keySet()) {
- if (elementToMove instanceof Operation) {
- final Operation operation = (Operation) elementToMove;
- final CallEvent callEvent = MessageUtils.getCallEvent(operation);
- if (callEvent != null) {
- MoveElementsCommand command = MessageUtils.createMoveCallEventCommand(request, callEvent);
- compositeMoveCommand.add(command);
- }
- }
- }
+ protected ICommand getAfterCreateCommand(CreateElementRequest request) {
+ if (request.getElementType().getId().equals(IUMLRTElementTypes.RT_MESSAGE_IN_ID)) {
+ EObject container = request.getContainer();
+ Element element = (Element)container;
+ org.eclipse.uml2.uml.Package pack = element.getNearestPackage();
+ CreateElementRequest req = new CreateElementRequest(request.getEditingDomain(), pack, ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.CallEvent"));
}
-
- if (compositeMoveCommand.isEmpty()) {
- compositeMoveCommand.add(super.getAfterMoveCommand(request));
- }
-
- return compositeMoveCommand;
+ return super.getAfterCreateCommand(request);
}
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/ProtocolContainerEditHelperAdvice.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/ProtocolContainerEditHelperAdvice.java
index 41154146749..b9d7c4d9592 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/ProtocolContainerEditHelperAdvice.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/ProtocolContainerEditHelperAdvice.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.GetEditContextCommand;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
@@ -50,10 +51,10 @@ public class ProtocolContainerEditHelperAdvice extends AbstractEditHelperAdvice
IElementType type = createElementRequest.getElementType();
// type should only be compatible with UMLRT::OperationAsMessages
- IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_OPERATION_AS_MESSAGE);
+ IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_MESSAGE_ID);
// should not be null, otherwise, element type model is not loaded correctly. abort.
if (umlRTMessageType == null) {
- Activator.log.debug("MessageAsOperation element type is not accessible");
+ Activator.log.debug("RTMessage element type is not accessible");
return super.approveRequest(request);
}
@@ -61,8 +62,10 @@ public class ProtocolContainerEditHelperAdvice extends AbstractEditHelperAdvice
List<IElementType> types = Arrays.asList(type.getAllSuperTypes());
if (types.contains(umlRTMessageType)) {
return true;
+ } else {
+ // return false;
+ return super.approveRequest(createElementRequest);
}
- return super.approveRequest(request);
}
return super.approveRequest(request);
}
@@ -71,15 +74,37 @@ public class ProtocolContainerEditHelperAdvice extends AbstractEditHelperAdvice
* {@inheritDoc}
*/
@Override
- protected ICommand getAfterEditContextCommand(GetEditContextRequest request) {
+ protected ICommand getBeforeEditContextCommand(GetEditContextRequest request) {
IEditCommandRequest editCommandRequest = request.getEditCommandRequest();
if(editCommandRequest instanceof CreateElementRequest) {
// check the element to create is a sub kind of RTMessage
-
+ CreateElementRequest createElementRequest = ((CreateElementRequest) editCommandRequest);
+ // retrieve element type from this request and check if this is a kind of UMLRT::Message
+ IElementType type = createElementRequest.getElementType();
+
+ // type should only be compatible with UMLRT::OperationAsMessages
+ IElementType umlRTMessageType = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.RT_MESSAGE_ID);
+ // should not be null, otherwise, element type model is not loaded correctly. abort.
+ if (umlRTMessageType == null) {
+ Activator.log.debug("RTMessage element type is not accessible");
+ return super.getBeforeEditContextCommand(request);
+ }
+
+ // check type is compatible with UMLRT::OperationAsMessages. If yes, allow creation
+ List<IElementType> types = Arrays.asList(type.getAllSuperTypes());
+ if (types.contains(umlRTMessageType)) {
+ // return the right message set here rather than the protocol container
+
+ GetEditContextCommand command = new GetEditContextCommand(request);
+ if (request.getEditContext() instanceof Package) {
+ command.setEditContext(ProtocolContainerUtils.getMessageSetIn((Package) request.getEditContext()));
+ }
+ return command;
+ }
}
- return super.getAfterEditContextCommand(request);
+ return super.getBeforeEditContextCommand(request);
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageInMatcher.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageInMatcher.java
new file mode 100644
index 00000000000..c2d9b4e098a
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageInMatcher.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.custom.advice;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
+import org.eclipse.papyrus.umlrt.custom.utils.RTMessageUtils;
+
+/**
+ *
+ */
+public class RTMessageInMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean matches(EObject eObject) {
+ return RTMessageUtils.isRTMessage(eObject, RTMessageKind.IN);
+ }
+
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageMatcher.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageMatcher.java
new file mode 100644
index 00000000000..1a0b5515ff7
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/advice/RTMessageMatcher.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.custom.advice;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.papyrus.umlrt.custom.utils.RTMessageUtils;
+
+/**
+ *
+ */
+public class RTMessageMatcher implements IElementMatcher {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean matches(EObject eObject) {
+ return RTMessageUtils.isRTMessage(eObject);
+ }
+
+}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageSetUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageSetUtils.java
index ec8128c54f7..0d1135cc851 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageSetUtils.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/MessageSetUtils.java
@@ -17,6 +17,7 @@ import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageSet;
import org.eclipse.papyrus.umlrt.UMLRealTime.UMLRealTimePackage;
import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Stereotype;
/**
@@ -65,4 +66,18 @@ public class MessageSetUtils {
return protocolName + "IO";
}
+ /**
+ * @param owner
+ * @return
+ */
+ public static boolean isRTMessageSet(Element owner) {
+ if (owner instanceof Interface) {
+ Stereotype stereotype = ((Interface) owner).getAppliedStereotype("UMLRealTime::" + UMLRealTimePackage.eINSTANCE.getRTMessageSet().getName());
+ if (stereotype != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java
index 5065fcdecbd..dc82c0a8860 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolContainerUtils.java
@@ -13,18 +13,26 @@
package org.eclipse.papyrus.umlrt.custom.utils;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageSet;
+import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes;
import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Interface;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.util.UMLUtil;
/**
@@ -33,17 +41,39 @@ import org.eclipse.uml2.uml.util.UMLUtil;
public class ProtocolContainerUtils {
/**
+ * @param protocolContainer
+ * @param direction
+ * @param showInherited
+ * @return
+ */
+ public static List<Operation> getRTMessages(Package protocolContainer, RTMessageKind direction, boolean showInherited) {
+ Interface messageSet = getMessageSet(protocolContainer, direction);
+ if (messageSet != null) {
+
+ if (showInherited) {
+ return messageSet.getAllOperations(); // this will also display inherited operations
+ }
+ return messageSet.getOwnedOperations(); // only contained
+ }
+ return Collections.emptyList();
+ }
+
+ /**
+ * @param protocolContainer
+ * @param direction
+ * @return
+ */
+ public static List<Operation> getAllRTMessages(Package protocolContainer, RTMessageKind direction) {
+ return getRTMessages(protocolContainer, direction, true);
+ }
+
+ /**
* Returns all the In Operations attached to the protocol in this protocol container
*
* @return all the In Operations attached to the protocol in this protocol container or an empty list if there was no protocol/interfacein.
- */
- public static List<Operation> getAllInOperations(Package protocolContainer) {
- Interface messageSetIn = getMessageSetIn(protocolContainer);
- if(messageSetIn !=null) {
- // warning: this will display only direct contained operations, not the inherited ones.
- return messageSetIn.getOwnedOperations();
- }
- return Collections.emptyList();
+ */
+ public static List<Operation> getAllInRTMessages(Package protocolContainer) {
+ return getAllRTMessages(protocolContainer, RTMessageKind.IN);
}
/**
@@ -51,13 +81,8 @@ public class ProtocolContainerUtils {
*
* @return all the Out Operations attached to the protocol in this protocol container or <code>null</code> if there was no protocol/interfacein.
*/
- public static Collection<Operation> getAllOutOperations(Package protocolContainer) {
- Interface messageSetOut = getMessageSetOut(protocolContainer);
- if (messageSetOut != null) {
- // warning: this will display only direct contained operations, not the inherited ones.
- return messageSetOut.getOwnedOperations();
- }
- return Collections.emptyList();
+ public static Collection<Operation> getAllOutRTMessages(Package protocolContainer) {
+ return getAllRTMessages(protocolContainer, RTMessageKind.OUT);
}
/**
@@ -65,51 +90,169 @@ public class ProtocolContainerUtils {
*
* @return all the InOut Operations attached to the protocol in this protocol container or <code>null</code> if there was no protocol/interfacein.
*/
- public static Collection<Operation> getAllInOutOperations(Package protocolContainer) {
- Interface messageSetInOut = getMessageSetInOut(protocolContainer);
- if (messageSetInOut != null) {
- // warning: this will display only direct contained operations, not the inherited ones.
- return messageSetInOut.getOwnedOperations();
- }
- return Collections.emptyList();
+ public static Collection<Operation> getAllInOutRTMessages(Package protocolContainer) {
+ return getAllRTMessages(protocolContainer, RTMessageKind.IN_OUT);
+ }
+
+
+
+ /**
+ * @param protocolContainer
+ * @param direction
+ * @param showInherited
+ * @return
+ */
+ public static List<Operation> getRTMessages(Package protocolContainer, RTMessageKind direction) {
+ return getRTMessages(protocolContainer, direction, false);
+ }
+
+ /**
+ * Returns all the In Operations attached to the protocol in this protocol container
+ *
+ * @return all the In Operations attached to the protocol in this protocol container or an empty list if there was no protocol/interfacein.
+ */
+ public static List<Operation> getInRTMessages(Package protocolContainer) {
+ return getRTMessages(protocolContainer, RTMessageKind.IN);
+ }
+
+ /**
+ * Returns all the Out Operations attached to the protocol in this protocol container
+ *
+ * @return all the Out Operations attached to the protocol in this protocol container or <code>null</code> if there was no protocol/interfacein.
+ */
+ public static Collection<Operation> geOutRTMessages(Package protocolContainer) {
+ return getRTMessages(protocolContainer, RTMessageKind.OUT);
+ }
+
+ /**
+ * Returns all the InOut Operations attached to the protocol in this protocol container
+ *
+ * @return all the InOut Operations attached to the protocol in this protocol container or <code>null</code> if there was no protocol/interfacein.
+ */
+ public static Collection<Operation> getInOutRTMessages(Package protocolContainer) {
+ return getRTMessages(protocolContainer, RTMessageKind.IN_OUT);
}
public static Interface getMessageSet(Package protocolContainer, RTMessageKind messageKind) {
- for(PackageableElement packageableElement : protocolContainer.getPackagedElements()) {
+ for (PackageableElement packageableElement : protocolContainer.getPackagedElements()) {
// look each interface to find the right one with the stereotype message set
- if(packageableElement instanceof Interface) {
+ if (packageableElement instanceof Interface) {
RTMessageSet messageSet = UMLUtil.getStereotypeApplication(packageableElement, RTMessageSet.class);
if (messageSet != null && messageKind != null && messageKind.equals(messageSet.getRtMsgKind())) {
- return (Interface)packageableElement;
+ return (Interface) packageableElement;
}
}
}
return null;
}
-
-
+
+
public static Interface getMessageSetIn(Package protocolContainer) {
return getMessageSet(protocolContainer, RTMessageKind.IN);
}
-
+
public static Interface getMessageSetOut(Package protocolContainer) {
return getMessageSet(protocolContainer, RTMessageKind.OUT);
}
-
+
public static Interface getMessageSetInOut(Package protocolContainer) {
return getMessageSet(protocolContainer, RTMessageKind.IN_OUT);
}
public static Collaboration getCollaboration(Package protocolContainer) {
- for(PackageableElement packageableElement : protocolContainer.getPackagedElements()) {
+ for (PackageableElement packageableElement : protocolContainer.getPackagedElements()) {
// look each interface to find the right one with the stereotype message set
- if(packageableElement instanceof Collaboration) {
- return (Collaboration)packageableElement;
+ if (packageableElement instanceof Collaboration) {
+ return (Collaboration) packageableElement;
}
}
return null;
}
-
+
+ public static boolean containsProtocolContainer(Package container) {
+ Collection<Package> packages = EcoreUtil.getObjectsByType(container.getPackagedElements(), UMLPackage.eINSTANCE.getPackage());
+
+ if (packages != null && !packages.isEmpty()) {
+ IElementType type = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.PROTOCOL_CONTAINER_ID);
+ if (!(type instanceof ISpecializationType)) { // check at the same time UMLRT element types are correctly loaded
+ return false;
+ }
+
+ for (Package pkg : packages) {
+ // check the package is a protocol container
+ if (((ISpecializationType) type).getMatcher().matches(pkg)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public static List<Package> getContainedProtocolContainers(Package container) {
+ Collection<Package> packages = EcoreUtil.getObjectsByType(container.getPackagedElements(), UMLPackage.eINSTANCE.getPackage());
+
+ if (packages != null && !packages.isEmpty()) {
+ IElementType type = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.PROTOCOL_CONTAINER_ID);
+ if (!(type instanceof ISpecializationType)) { // check at the same time UMLRT element types are correctly loaded
+ return Collections.emptyList();
+ }
+
+ List<Package> protocolContainers = null;
+ for (Package pkg : packages) {
+ // check the package is a protocol container
+ if (((ISpecializationType) type).getMatcher().matches(pkg)) {
+ if (protocolContainers == null) {
+ protocolContainers = new ArrayList<Package>();
+ }
+ protocolContainers.add(pkg);
+ }
+ }
+ }
+ return Collections.emptyList();
+ }
+
+
+ public static boolean isProtocolContainer(EObject package_) {
+ IElementType type = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.PROTOCOL_CONTAINER_ID);
+ if (!(type instanceof ISpecializationType)) { // check at the same time UMLRT element types are correctly loaded
+ return false;
+ }
+ if (((ISpecializationType) type).getMatcher().matches(package_)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * REturns the packageElements, but with package protocolcontainers replaced by protocol
+ *
+ * @param source
+ * @return
+ */
+ public static List<PackageableElement> getFilteredPackagedElements(Element source) {
+ if (!(source instanceof Package)) {
+ return Collections.emptyList();
+ }
+
+ if (!containsProtocolContainer((Package) source)) {
+ return ((Package) source).getPackagedElements();
+ }
+
+ List<PackageableElement> returnList = new ArrayList<PackageableElement>(((Package) source).getPackagedElements());
+
+ for (PackageableElement packageableElement : ((Package) source).getPackagedElements()) {
+ if (packageableElement instanceof Package) {
+ if ((isProtocolContainer(packageableElement))) {
+ // replace element in return list
+ int i = returnList.indexOf(packageableElement);
+ returnList.remove(packageableElement);
+ returnList.add(i, ProtocolContainerUtils.getCollaboration((Package) packageableElement));
+ }
+ }
+ }
+ return returnList;
+ }
+
/**
* Returns ProtocolContainer of a given UML::PackagableElement.
* @param element
@@ -134,5 +277,8 @@ public class ProtocolContainerUtils {
}
return result;
- }
+ }
+
+
+
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolUtils.java
index 9607a9f60d8..155038e0d35 100644
--- a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolUtils.java
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/ProtocolUtils.java
@@ -13,7 +13,18 @@
package org.eclipse.papyrus.umlrt.custom.utils;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
+import org.eclipse.papyrus.umlrt.custom.IUMLRTElementTypes;
+import org.eclipse.papyrus.umlrt.internals.Activator;
import org.eclipse.uml2.uml.Collaboration;
+import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Package;
/**
@@ -32,4 +43,36 @@ public class ProtocolUtils {
return protocol.getNearestPackage();
}
+ /**
+ * Returns <code>true</code> if the context element is a Protocol (Collaboration stereotyped by "protocol")
+ *
+ * @param context
+ * the eobject to test
+ * @return <code>true</code> if the context element is a Protocol (Collaboration stereotyped by "protocol")
+ */
+ public static Boolean isProtocol(EObject context) {
+ IElementType type = ElementTypeRegistry.getInstance().getType(IUMLRTElementTypes.PROTOCOL_ID);
+ if (!(type instanceof ISpecializationType)) { // check at the same time UMLRT element types are correctly loaded
+ return false;
+ }
+ if (((ISpecializationType) type).getMatcher().matches(context)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @param in
+ * @return
+ */
+ public static List<Operation> getRTMessages(Collaboration protocol, RTMessageKind direction, boolean showInherited) {
+ Package protocolContainer = getPackageContainer(protocol);
+ if(protocolContainer ==null) {
+ Activator.log.error("Impossible to get the root protocol container", null);
+ return Collections.emptyList();
+ }
+
+ return ProtocolContainerUtils.getRTMessages(protocolContainer, direction, showInherited);
+ }
+
}
diff --git a/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/RTMessageUtils.java b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/RTMessageUtils.java
new file mode 100644
index 00000000000..1ab2141f83d
--- /dev/null
+++ b/extraplugins/umlrt/org.eclipse.papyrus.umlrt/src/org/eclipse/papyrus/umlrt/custom/utils/RTMessageUtils.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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.umlrt.custom.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.umlrt.UMLRealTime.RTMessageKind;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Operation;
+
+/**
+ * Utility class on {@link Operation} that are RTMessage
+ */
+public class RTMessageUtils {
+
+ /**
+ * Retrieves the direction for a given element
+ *
+ * @param object
+ * the object for which direction is looked after
+ * @return the di
+ */
+ public static RTMessageKind getMessageKind(Object object) {
+ if (object instanceof Operation) {
+ // get Owner of the operation, and check if this is a messageSET
+ Element owner = ((Operation)object).getOwner();
+ RTMessageKind kind = MessageSetUtils.getMessageKind(owner);
+ return kind;
+ }
+ return null;
+ }
+
+ /**
+ * @param eObject
+ * @return
+ */
+ public static boolean isRTMessage(EObject operation) {
+ if (operation instanceof Operation) {
+ // get Owner of the operation, and check if this is a messageSET
+ Element owner = ((Operation) operation).getOwner();
+ return MessageSetUtils.isRTMessageSet(owner);
+ }
+ return false;
+ }
+
+ /**
+ * @param eObject
+ * @param in
+ * @return
+ */
+ public static boolean isRTMessage(EObject operation, RTMessageKind in) {
+ if (operation instanceof Operation) {
+ // get Owner of the operation, and check if this is a messageSET
+ Element owner = ((Operation) operation).getOwner();
+ RTMessageKind kind = MessageSetUtils.getMessageKind(owner);
+ if (kind == in) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/plugins/developer/org.eclipse.papyrus.doc/intro/firststeps.xml b/plugins/developer/org.eclipse.papyrus.doc/intro/firststeps.xml
index 9d84d6b5484..ebafdb878eb 100644
--- a/plugins/developer/org.eclipse.papyrus.doc/intro/firststeps.xml
+++ b/plugins/developer/org.eclipse.papyrus.doc/intro/firststeps.xml
@@ -3,7 +3,7 @@
<extensionContent id="org.eclipse.team.papyrus.firststeps" name="Papyrus First Steps" style="css/firststeps.css" path="firststeps/@">
<group label="Papyrus" style-id="content-group" id="org.eclipse.papyrus-firststeps-group">
<link label="New Papyrus Project"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.papyrus.uml.diagram.wizards&#38;class=org.eclipse.papyrus.uml.diagram.wizards.NewProjectAction"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.papyrus.uml.diagram.wizards&amp;class=org.eclipse.papyrus.uml.diagram.wizards.action.NewProjectAction"
id="newpapyrusproject-introLink" style-id="content-link">
<text>Start with creation of new Papyrus project</text>
</link>
diff --git a/plugins/developer/org.eclipse.papyrus.doc/intro/overview.xml b/plugins/developer/org.eclipse.papyrus.doc/intro/overview.xml
index 6d8ef3b5184..0ff38e4ad54 100644
--- a/plugins/developer/org.eclipse.papyrus.doc/intro/overview.xml
+++ b/plugins/developer/org.eclipse.papyrus.doc/intro/overview.xml
@@ -3,7 +3,7 @@
<extensionContent id="org.eclipse.team.papyrus.overview" name="Papyrus overview" style="css/overview.css" path="overview/@">
<group style-id="content-group" id="org.eclipse.papyrus-firststeps-group">
<link label="New Papyrus Project"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.papyrus.uml.diagram.wizards&#38;class=org.eclipse.papyrus.uml.diagram.wizards.NewProjectAction"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.papyrus.uml.diagram.wizards&amp;class=org.eclipse.papyrus.uml.diagram.wizards.action.NewProjectAction"
id="newpapyrusproject-introLink" style-id="content-link">
<text>Start with creation of new Papyrus project</text>
</link>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF
index 5947b07f4e5..9c633f57efc 100755
--- a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.doc;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki
index 760b6841455..82509166c2b 100755
--- a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki
@@ -278,7 +278,7 @@ Developer documentation is available [[Papyrus_Developer_Guide/Papyrus_Embedded_
===Usage===
* This editors allows to find named element typing its name.
-* In case of several elements to found, the separator to use is the comma </code>'</code>
+* In case of several elements to found, the separator to use is the comma <code>'</code>
* If the name of the element contains a comma, you should prefix and suffix its name by a quote <code>'</code>.
* The value will not be set if the element can't be found is the model
@@ -307,5 +307,5 @@ If you have 3 Classes in your model, named <code>Class1</code>, <code>Class2</co
|-
| Clas,
| <Undefined>,...
-| interpreted as a list of value, the first value is </code>Clas</code>, and we have no information for the second one, for the completion it is an empty string
+| interpreted as a list of value, the first value is <code>Clas</code>, and we have no information for the second one, for the completion it is an empty string
|}
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedMode.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedMode.png
new file mode 100644
index 00000000000..a284dadf074
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedMode.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedModeXText.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedModeXText.png
new file mode 100644
index 00000000000..f2876c86320
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/advancedModeXText.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonSwitch.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonSwitch.png
new file mode 100644
index 00000000000..d1917c030ae
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonSwitch.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonsEdit.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonsEdit.png
new file mode 100644
index 00000000000..f5a0c22957b
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/buttonsEdit.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/preferencesMultiplicityEditor.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/preferencesMultiplicityEditor.png
new file mode 100644
index 00000000000..ad1f9309a4a
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/preferencesMultiplicityEditor.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleMode.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleMode.png
new file mode 100644
index 00000000000..2fe8d2847c0
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleMode.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleModeDisabled.png b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleModeDisabled.png
new file mode 100644
index 00000000000..13b6459c564
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/images/simpleModeDisabled.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view-main-toc.xml b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view-main-toc.xml
index f026f340756..0add93e6d77 100644
--- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view-main-toc.xml
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view-main-toc.xml
@@ -1,7 +1,7 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<toc label="Search" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocUser">
- <topic href="target/generated-eclipse-help/properties-view.html" label="Properties view customization">
- <link toc="target/generated-eclipse-help/properties-view-toc.xml"/>
- <anchor id="properties-view"/>
- </topic>
-</toc>
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Search" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocUser">
+ <topic href="target/generated-eclipse-help/properties-view.html" label="Properties view">
+ <link toc="target/generated-eclipse-help/properties-view-toc.xml"/>
+ <anchor id="properties-view"/>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki
index e609186f061..a66b0ac94e6 100644
--- a/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.views.properties.doc/resource/properties-view.mediawiki
@@ -1,307 +1,385 @@
-== INTRODUCTION ==
-In UML, the main information is represented in graphical diagrams. However, it is not always possible to represent graphically the whole semantic of UML, not talking of all the cosmetic properties. For example, it is pretty easy to represent and to edit a Class' name graphically. While we still can represent the 'is abstract' property graphically (By using the italic font for the Class' name), it is harder to edit this property directly from the diagram. Worse, the 'is leaf' property doesn't even have a graphical representation. Thus, we often need a different view for representing all the properties of a UML Element, without polluting the graphical view.
-
-
-As UML is highly extensible, through the mean of Profiles, it is also important to be able to represent and edit the profile's properties, without managing everything from the diagram view.
-
-
-Eclipse provides a standard view for these properties: the Properties Page. This view is a table representing all the properties available for the selected Element, including the ones that cannot be represented or edited graphically. This view is pretty useful, but is neither really user-friendly nor optimal, as it may require up to four clicks to simply edit a comment's body. Moreover, it can only be extended via Java code, which requires some technical skills and prevents a dynamic modification of the view, as the Java code needs to be recompiled after each modification.
-
-
-There is an extension of the base Property View framework, still in the standard Eclipse implementation, which fixes some of these problems. It is called the 'Eclipse Tabbed Properties View' framework. It provides a better look and feel for the property view, with more flexibility, and a better usability. However, it keeps being difficult to customize, as it still hard-coded in Java.
-
-
-Papyrus provides its own Property View framework, based on the Tabbed Property View framework. The Papyrus Property View can be extended in two ways:
-* Dynamically, for the layout of the property view: show/hide a property, reorder the properties, add/remove a tab'
-* Statically, through Java code, for advanced operations: create a new widget for editing the properties, add a custom Content Provider for selecting a reference value'
-This document aims at detailing all the features related to the property view customization, both dynamically and statically.
-
-== THE CUSTOMIZATION TOOL ==
-
-Most customizations can be done through the Property view customization Editor. It provides native support for EMF Models, UML models and profiles. It also provides a set of basic widgets and property editors.
-
-=== Edit a configuration ===
-
-Each property view configuration is defined in a different set of files. Each configuration can contain elements from different contexts, but we typically have one configuration per Ecore Metamodel or UML Profile (i.e. one configuration for UML, one for the Diagram Appearance tab, another one for the SysML profile')
-
-To see the list of available configurations, open the properties view (Window -> Show View -> Other' -> General/Properties). Click on the white arrow in the upper right corner of the Properties view, and select 'Customize property view'. You should see a dialog with the list of all available configurations.
-
-
-[[File:images/fig1.png|Open the property view customization menu]]
-
-As the standard configurations are read-only, you cannot edit them directly. You will first need to make a copy of the configuration. You will then be able to edit the copy.
-
-[[File:images/fig2.png|Copy an existing configuration to edit it]]
-
-
-The Property View Editor has three panes:
-* The Editor part
-* The Preview part
-* The Properties part
-The Editor presents the elements defined by this configuration. The Preview displays an overview of the selected View, as it will be displayed in the property view at runtime. The properties view displays the properties of the selected element
-
-[[File:images/fig3.png|The property view Editor]]
-
-
-=== The property view elements ===
-
-The editor contains a Tree, containing the following elements :
-* Context: it is a property view configuration. You will typically have one property view Context per Ecore Metamodel or UML Profile, but you can choose the granularity you want. A context has a list of tabs, and a list of views.
-* Tab: describes a tab in the property view. A tab has a label, an (optional) image, and can be indented. It also has a priority.
-* View: describes a property view associated to a selection. The view has a name, a constraint, a multiplicity and a list of sections. The constraint is used to determine for what kind of object the view should be displayed.
-* Constraint: a query that inputs a selection, and outputs a boolean (true if the constraint matches the input object, false otherwise). It is possible to implement your own constraint type (In Java).
-* Section: a section is a sub-part of a view. A view generally needs only one section, but there are cases where you need more than one section. A section is associated to a single tab, so, if you want to display more than one tab in a single view (For example, ' UML ' and ' Profile ' in the UML property view), you will need at least two sections in that view (One for each tab). Another (advanced) case is described in ' Dynamic sections '. A section has a name, a tab, and a Composite.
-* Composite: this is the actual presentation element. The composite is a widget which can contain other widgets. A composite has a type, and a list of widgets.
-* Layout: all composites need a layout. The default is ' PropertiesLayout ', which is a variant of the SWT standard GridLayout. A PropertiesLayout has a number of columns. The default is one column.
-* Property Editor: a property editor is a widget which is used to edit a single property of the selected object. You will typically have one Property editor for each property that you want to edit in the property view. The property editor has a property, and a widget to edit that property.
-* Standard Widget: a widget from the standard SWT Library. Few of them are currently available, because they are rarely needed.
-The Tree allows reordering or removing easily the elements (Through drag & drop, delete). The editor also supports the Undo/Redo commands.
-
-==== Preview ====
-
-The preview displays a real-time overview of the selected View. However, some widgets can only be computed at runtime, which prevents a pertinent preview. This is the case of the 'Enum Radio' widget, for example, as the enumerated values are only known at runtime.
-
-==== Property view ====
-
-The property view is used to edit the properties of the element selected in the tree. The property view uses the Papyrus Property View framework, thus can be customized just the same way you would customize any other property view.
-
-[[File:images/fig4.png| the three panes of the Property view editor]]
-
-=== Priorities between views ===
-When more than one view match a selection, a priority mechanism will determine which one(s) should be displayed. The priorities are defined at the level of the view's constraints, i.e. if the constraint for a View A overrides a constraint for the View B, the View B won't be displayed. For example, a UML Class from a Class Diagram will match many views (The list is not exhaustive):
-
-* SingleClass (From UML)
-* MultipleClass (As the -1 multiplicity actually means 'any number of elements')
-* SingleElement (And MultipleElement)
-* SingleClassifier (And MultipleClassifier)
-* *Style (From GMF Notation model)
-* StereotypeDisplay (From UML Notation model)
-
-The priorities are computed in two ways:
-
-* Automatic, according to the Java constraints implementations
-* Statically, according to the property view configuration
-
-When the 'isOverrideable' property is set to false for a Constraint (In the property view model), only the static rules will be taken into account.
-
-[[File:images/fig5.png|The constraint cannot be dynamically overridden]]
-
-The automatic rules are the following:
-
-* A constraint with a multiplicity of 1 always overrides the same constraint with a multiplicity of -1 (Or >1). Thus, 'MultipleClass' won't be displayed, because 'SingleClass' also matches our selection.
-* An EMF (Or UML) 'Instance of' constraint always overrides a constraint matching a supertype. Thus, 'SingleClassifier' won't be displayed, because a Class is more specific than a Classifier. However, 'SingleElement' *will be* displayed, because it is not overrideable (isOverrideable=false).
-* A stereotype constraint (HasStereotype) will *not* override its UML 'Instance of' constraint. However, a specific implementation of this constraint has been provided for Scade, which *will* override the UML metaclass (i.e., a Block will override a Class' property view, hiding the UML tab).
-* For CompositeConstraints: if a composite constraint is a superset of another constraint, it will override it (It is more specific). For example, a Composite Constraint 'isA and isB' will override a constraint 'isB', but will not override a constraint 'isB and isC'.
-
-Please note that each constraint has its own implementation of the overrides() method. See the advanced chapter for more information
-
-The static rule is simple: when a Constraint explicitly overrides another constraint, it will always override it. This is especially useful when you've marked a constraint as 'overrideable=false', but still want to override it in a specific case (Remember that overrideable=false only applies to *automatic* constraint resolution).
-
-[[File:images/fig6.png|Force this constraint to override another constraint]]
-
-
-Finally, in the previous example, the following views will be displayed:
-
-* SingleClass (Overrides MultipleClass, Single/MultipleClassifier ; UML Tab)
-* SingleElement (overrideable=false ; Profile tab)
-* FillStyle, FontStyle, LineStyle (Appearance tab)
-* StereotypeDisplay (overrideable=false ; Appearance tab)
-
-=== Preferences ===
-
-When you make a copy of a property view, it is not automatically activated. Thus, the modifications brought to the copy are not immediately visible on your property view. To activate a property view, you need to open the Papyrus preferences, from Window > Preferences.
-
-[[File:images/fig7.png|Preferences]]
-
-When making a copy of an existing configuration, you should uncheck the default one, and check the new one.
-
-== ADVANCED CUSTOMIZATION ==
-
-The customization tool only allows basic operations, such as adding, removing or reordering properties.
-
-The property view framework is much more powerful, but this requires some Java development. This chapter will focus on the advanced customization of the property view.
-
-=== The Environment model ===
-
-To associate Java implementations with the property view model, you need to declare an Environment model. You can create a new Environment model with the 'Environment Model' wizard in 'Example EMF Model Creation Wizards' category. Select 'Environment' as the Model Object.
-
-Once you've added your Java class declarations, you should register the environment model so that the property view knows about it. Add an extension to org.eclipse.papyrus.properties.environment, and select your model file.
-
-=== Create a new widget ===
-
-You can create new widgets for the property view. There are four kinds of graphical elements: CompositeWidget, Layout, StandardWidget and PropertyEditor.
-The widgets contain three common fields:
-
-* Label: The label displayed in the Customization editor when the user selects a widget type.
-* Namespace: The XWT namespace associated to the Widget.
-* WidgetClass: The simple name of the Java class implementing the Widget.
-
-The PropertyEditor contains two additional fields:
-
-* Multiplicity: The multiplicity of the properties it can handle (1 for single-valued properties, -1 for multivalued properties)
-* Type: The type of the properties it can handle.
-
-To implement a Composite, Layout or Standard widget, you should simply follow the SWT rules, i.e. extend either Composite, Canvas or Layout, and have a (Composite, int) constructor. To define a PropertyEditor, you have two options:
-
-* Extend Composite, have a (Composite, int) constructor, and implement the CustomizablePropertyEditor interface (From org.eclipse.papyrus.properties.widgets)
-* Extend directly AbstractPropertyEditor (From org.eclipse.papyrus.properties.widgets)
-
-=== Constraints ===
-
-Adding a Constraint is similar to creating a new Widget. You have two options to implement a new Constraint:
-
-* Implement the Constraint interface (From org.eclipse.papyrus.properties.constraints)
-* Extend the AbstractConstraint class (From org.eclipse.papyrus.properties.constraints)
-
-The important methods are the following (depending on whether you're implement Constraint or extending AbstractConstraint):
-
-* setDescriptor/setConstraintDescriptor:
-** Configures the constraint.
-* match(Object)/match(IStructuredSelection) : Boolean
-** Indicates whether this constraint matches the given given or not
-* overrides(Constraint) : Boolean
-** Indicates whether this constraint overrides another constraint or not. A constraint should override another constraint when it is more specific.
-* equivalent(Constraint) : Boolean
-** This is only used by AbstractConstraint. Two constraints are equivalent if they have the same parameters (ConstraintDescriptor). Two equivalent constraints can have different multiplicities.
-
-The equivalent() and overrides() methods are used to automatically resolve constraints conflicts (Two different constraints matching the same element).
-Once the Constraint is implemented, don't forget to register it in your environment model.
-
-===ModelElement===
-
-The ModelElement is the interface between the property view and your domain model. It is used to retrieve information about the object(s) being edited from the property. These informations will be used to configure the widget. AbstractModelElement provides a base implementation for this interface.
-
-All methods from this interface take a single parameter, which is the name of the property being edited.
-
-* getObservable(String) / doGetObservable(String) :
-
-This method returns an IObservable which will be used to read and write a single property from the represented object. It should return an IObservableValue for single-valued properties, and IObservableList for multi-valued properties.
-
-* getContentProvider(String) :
-
-This method is only used for reference and enumerated properties. It should return a list of values which can be set to the edited property. Unlike IStructuredContentProvider, this provider will not rely on a StructuredViewer to retrieve an input object: the method getElement() will be called without any parameter, so the implementation should be able to retrieve its own typically. This will typically be achieved by passing a context object in the provider's constructor.
-
-* getLabelProvider(String) :
-
-This method is used to display an element's label for a few widgets. Note that the same instance of label provider can be used by more than one Viewer for a given property. For example, the MultiReference widget will display three viewers, each using the same label provider. Each viewer will try to dispose the LabelProvider as soon as they are themselves disposed (For example, when closing the selection dialog from MultiReference). Thus, you should probably not implement the dispose() method, to avoid inconsistent providers.
-
-* getValidator(String) :
-
-This method returns an IValidator, if there's one which is set up for the current property.
-
-=== ModelElement Factory ===
-
-The ModelElements are associated to DataContextElements through a ModelElementFactory. The ModelElementFactory is defined on the DataContextRoot. All children of a DataContextRoot will share the same ModelElementFactory.
-
-To add a new ModelElement, you should also create a new ModelElementFactory, and register it in your Environment model. Then, you can set this factory to your DataContextRoot.
-
-Note: to display the Data contexts, you need to check the toggle button on top of the editor: [[File:images/fig8.png]]
-
-[[File:images/fig9.png|The UML DataContextRoots, with their own factories]]
-
-=== Content Providers and Widgets ===
-
-Note: The ContentProviders have been refactored in Papyrus 0.9, to be simplified. However, most of this chapter should remain true.
-
-The ContentProvider is a complex features, which often evolves in the Papyrus property view. The ModelElement has been designed to be compatible with many kinds of different widgets (Combo-box, Tree-based dialogs'). The problem is that these widgets typically use different kinds of JFace ContentProvider (IStructuredContentProvider for flat display, ITreeContentProvider for Tree display). In the Property view, we needed to unify these providers.
-
-Thus, it is recommended to use a IHierarchicContentProvider, which extends ITreeContentProvider, with an additional method: isValidValue(Object). In a Tree, we typically have two kinds of elements: the elements which can potentially be selected, and their containers, which often cannot. The isValidValue() method is used to distinguish between these values.
-
-When a flat widget (e.g. ReferenceCombo) is used, only the valid values will be displayed. When a tree-based widget (e.g. ReferenceDialog) is used, a sub-tree will be displayed, excluding the sub-trees which don't contain any valid value. Moreover, the invalid values won't be selectable (For example, in the ReferenceDialog, the 'ok' button will be grayed).
-
-[[File:images/fig10.png|IHierarchicContentProvider at runtime]]
-
-=== Dynamic sections ===
-
-Sometimes, the property view should not depend on a selection, but on a specific property of the selected element. In such a case, it is frequent that this specific property might be edited by the property view itself. However, the property view is only refreshed when the selection changes.
-
-To overcome this problem, Papyrus offers a 'Dynamic section' feature, which allows refreshing dynamically one or more sections of the property view. For example, when you're editing a View's constraint in the Property view Editor, the constraint's properties directly depend on the constraint's type. When you select an UML constraint, the constraint's parameter is the name of a UML Metaclass. When you select an EMF constraint, the constraint has two parameters: Namespace URI of the Metamodel, and the name of the Metaclass. Changing the constraint type should also change the constraint's parameters editors.
-
-[[File:images/fig11.png|A view with a static and a dynamic section]]
-
-This can be achieved with dynamic sections, i.e. a section with a constraint. The constraint will be executed once at the beginning, and once again each time a property from the property view changes. If the constraint is matched, the section will be displayed. Otherwise, it will be hidden.
-A view with dynamic sections will typically look like the following:
-
-* A single unconstrained section containing the common parameters
-* One dynamic (i.e. constrained) section for each specific case
-
-[[File:images/fig12.png|Dynamic sections configuration]]
-
-Please note that tabs cannot be added nor removed dynamically. For example, when you apply a stereotype on a UML Element, the tab associated to the stereotype's property view cannot be displayed until you select the element again.
-
-=== Property view Header ===
-The Eclipse Tabbed Property View offers an extension point to define the label provider for the property view header. However, this label provider will be specific to the editor. For generic editors, it is not always possible to provide a pertinent label provider: they will always be too generic, and won't be able to handle specific elements. For example, a generic EMF Model Editor with the customizable property view will only be able to display standard EMF labels and icons. To overcome this problem, Papyrus offers a configurable label provider for the header: org.eclipse.papyrus.properties.provider.SelectionLabelProvider
-
-This label provider uses the selected element to find the most appropriate label provider, then dispatches the getText and getIcon calls to it. This label provider can be configured through an extension point: org.eclipse.papyrus.properties.labelprovider
-
-This extension point takes an implementation of IFilteredLabelProvider and a priority. The IFilteredLabelProvider is a label provider with an additional method: boolean accept(IStructuredSelection). For each selection, the label provider accepting the selection, and having the highest priority will be used to display a header for it. It will then be possible to define a generic label provider for all java objects, with the lowest priority; another generic label provider for all EMF Objects, and a really specific label provider for a given metamodel (with the highest priority).
-In Papyrus, we have such an example for UML. The Papyrus UML Diagrams use the GMF model, which doesn't have icons. We wanted to have a different icon for each type of Diagram: this is not possible with a standard EMF label provider, which associates an icon to an EClass, independently of its instances' attributes.
-
-So, we registered the standard EMF Label Provider with a medium priority, which can handle any kind of EObject, and a UML Label Provider, which can only handle UML Elements and GMF Diagrams, with a higher priority.
-
-The lower the priority number, the higher the priority actually is:
-
-* 100: Lowest priority. The standard EMF Object label provider has a priority of 100, and is called iff no other label provider can accept an EObject.
-* 50: Medium priority. The Papyrus UML Label Provider has a priority of 50.
-* 10: High priority.
-* 0: Highest priority.
-
-If no label provider matches the selection, the default JFace LabelProvider is used.
-
-=== Binding and Validation ===
-
-View Properties support JFace Databinding, which connects our UI to our model. For the validation there are two kinds of validators:
-
-* Widget validators: they check that our input is the kind of data expected by our widget before synchronizing it ( e.g IntegerEditor must have a correct integer for input)
-
-* Model validators: they check that our input verifies our model constraint, they must be instantiate in UmlModelElement#getValidator();
-
-If there are errors during the binding a control decoration is shown next to the widget. It also supports three level of severity (Ok, Warning, Error).
-
-[[File:images/fig13.png|Example of binding with a model validator and warning severity result]]
-
-=== Field coloration ===
-
-Properties views have fields' coloration. If you modify a value the background of the field will be orange, when you validate a change the background will turn green for couple of seconds if the synchronization was successful, it will turn red otherwise.
-
-[[File:images/fig14.png|Example of a field being modified]]
-
-== GENERATION TOOL ==
-
-Editing an existing property view can be useful, but most of the time, you'll want a brand new configuration for your own profile or meta-model. Thus, the framework provides a tool to automatically generate the initial property view, which you can then customize using the customization tool.
-The generator can create a property view configuration from either a UML Profile or an Ecore Meta-model. The wizard is available in the Papyrus category: File -> New -> Other' -> Papyrus/Property view configuration.
-
-The wizard provides two default generators:
-
-* Generate a property view from a UML Profile
-* Generate a property view from an Ecore Meta-model
-
-The source file must be located in your workspace. A default target file named will be filled with the .ctx extension (This is the extension for a property view configuration).
-
-Press next: a combo asks you which strategy to use.
-
-A basic method: all the elements from the profile or meta-model will be extracted, with no dependencies to other models.
-
-Same CTX file: you are asked to choose which models you want to extract, and will be saved in the same file
-
-Different CTX file(s): you are asked to choose which models you want to extract and they will be saved in different files, (each profile name will be the name of the generated ctx file)
-
-Press next: a table with all the elements extracted from your profile or meta-model is displayed. This table contains four columns:
-
-* Field: the name of the element or property
-* Display single: whether this property should be displayed when a single instance of this element is selected
-* Display multiple: whether this property should be displayed when more than one instance of this element is selected
-* Description: the description of the property (Most of the time, it will be N/A, as the default generators cannot extract the documentation from the source model).
-
-Press finish: two files or more files according to the chosen strategy and a folder are generated:
-
-* The *.ctx file, corresponding to your property view configuration
-* The ui/ folder, containing a set of XWT files, which contain the graphical information of your property views
-* The *FieldSelection.xmi file, which reminds the choices you've made about displaying each property. This file is currently unused.
-
-You can now open the *.ctx file and customize your property view.
-
-
-== DEPLOYING A PROPERTY VIEW ==
-
-Papyrus provides a simple tool to deploy a property view locally (Right click on a CTX file -> Deploy/Undeploy) \ No newline at end of file
+==Properties view customization==
+===Introduction===
+In UML, the main information is represented in graphical diagrams. However, it is not always possible to represent graphically the whole semantic of UML, not talking of all the cosmetic properties. For example, it is pretty easy to represent and to edit a Class' name graphically. While we still can represent the 'is abstract' property graphically (By using the italic font for the Class' name), it is harder to edit this property directly from the diagram. Worse, the 'is leaf' property doesn't even have a graphical representation. Thus, we often need a different view for representing all the properties of a UML Element, without polluting the graphical view.
+
+
+As UML is highly extensible, through the mean of Profiles, it is also important to be able to represent and edit the profile's properties, without managing everything from the diagram view.
+
+
+Eclipse provides a standard view for these properties: the Properties Page. This view is a table representing all the properties available for the selected Element, including the ones that cannot be represented or edited graphically. This view is pretty useful, but is neither really user-friendly nor optimal, as it may require up to four clicks to simply edit a comment's body. Moreover, it can only be extended via Java code, which requires some technical skills and prevents a dynamic modification of the view, as the Java code needs to be recompiled after each modification.
+
+
+There is an extension of the base Property View framework, still in the standard Eclipse implementation, which fixes some of these problems. It is called the 'Eclipse Tabbed Properties View' framework. It provides a better look and feel for the property view, with more flexibility, and a better usability. However, it keeps being difficult to customize, as it still hard-coded in Java.
+
+
+Papyrus provides its own Property View framework, based on the Tabbed Property View framework. The Papyrus Property View can be extended in two ways:
+* Dynamically, for the layout of the property view: show/hide a property, reorder the properties, add/remove a tab'
+* Statically, through Java code, for advanced operations: create a new widget for editing the properties, add a custom Content Provider for selecting a reference value'
+This document aims at detailing all the features related to the property view customization, both dynamically and statically.
+
+===The customization tool===
+
+Most customizations can be done through the Property view customization Editor. It provides native support for EMF Models, UML models and profiles. It also provides a set of basic widgets and property editors.
+
+=== Edit a configuration ===
+
+Each property view configuration is defined in a different set of files. Each configuration can contain elements from different contexts, but we typically have one configuration per Ecore Metamodel or UML Profile (i.e. one configuration for UML, one for the Diagram Appearance tab, another one for the SysML profile')
+
+To see the list of available configurations, open the properties view (Window -> Show View -> Other' -> General/Properties). Click on the white arrow in the upper right corner of the Properties view, and select 'Customize property view'. You should see a dialog with the list of all available configurations.
+
+
+[[File:images/fig1.png|Open the property view customization menu]]
+
+As the standard configurations are read-only, you cannot edit them directly. You will first need to make a copy of the configuration. You will then be able to edit the copy.
+
+[[File:images/fig2.png|Copy an existing configuration to edit it]]
+
+
+The Property View Editor has three panes:
+* The Editor part
+* The Preview part
+* The Properties part
+The Editor presents the elements defined by this configuration. The Preview displays an overview of the selected View, as it will be displayed in the property view at runtime. The properties view displays the properties of the selected element
+
+[[File:images/fig3.png|The property view Editor]]
+
+
+====The property view elements====
+
+The editor contains a Tree, containing the following elements :
+* Context: it is a property view configuration. You will typically have one property view Context per Ecore Metamodel or UML Profile, but you can choose the granularity you want. A context has a list of tabs, and a list of views.
+* Tab: describes a tab in the property view. A tab has a label, an (optional) image, and can be indented. It also has a priority.
+* View: describes a property view associated to a selection. The view has a name, a constraint, a multiplicity and a list of sections. The constraint is used to determine for what kind of object the view should be displayed.
+* Constraint: a query that inputs a selection, and outputs a boolean (true if the constraint matches the input object, false otherwise). It is possible to implement your own constraint type (In Java).
+* Section: a section is a sub-part of a view. A view generally needs only one section, but there are cases where you need more than one section. A section is associated to a single tab, so, if you want to display more than one tab in a single view (For example, ' UML ' and ' Profile ' in the UML property view), you will need at least two sections in that view (One for each tab). Another (advanced) case is described in ' Dynamic sections '. A section has a name, a tab, and a Composite.
+* Composite: this is the actual presentation element. The composite is a widget which can contain other widgets. A composite has a type, and a list of widgets.
+* Layout: all composites need a layout. The default is ' PropertiesLayout ', which is a variant of the SWT standard GridLayout. A PropertiesLayout has a number of columns. The default is one column.
+* Property Editor: a property editor is a widget which is used to edit a single property of the selected object. You will typically have one Property editor for each property that you want to edit in the property view. The property editor has a property, and a widget to edit that property.
+* Standard Widget: a widget from the standard SWT Library. Few of them are currently available, because they are rarely needed.
+The Tree allows reordering or removing easily the elements (Through drag & drop, delete). The editor also supports the Undo/Redo commands.
+
+=====Preview=====
+
+The preview displays a real-time overview of the selected View. However, some widgets can only be computed at runtime, which prevents a pertinent preview. This is the case of the 'Enum Radio' widget, for example, as the enumerated values are only known at runtime.
+
+=====Property view=====
+
+The property view is used to edit the properties of the element selected in the tree. The property view uses the Papyrus Property View framework, thus can be customized just the same way you would customize any other property view.
+
+[[File:images/fig4.png| the three panes of the Property view editor]]
+
+=== Priorities between views ===
+When more than one view match a selection, a priority mechanism will determine which one(s) should be displayed. The priorities are defined at the level of the view's constraints, i.e. if the constraint for a View A overrides a constraint for the View B, the View B won't be displayed. For example, a UML Class from a Class Diagram will match many views (The list is not exhaustive):
+
+* SingleClass (From UML)
+* MultipleClass (As the -1 multiplicity actually means 'any number of elements')
+* SingleElement (And MultipleElement)
+* SingleClassifier (And MultipleClassifier)
+* *Style (From GMF Notation model)
+* StereotypeDisplay (From UML Notation model)
+
+The priorities are computed in two ways:
+
+* Automatic, according to the Java constraints implementations
+* Statically, according to the property view configuration
+
+When the 'isOverrideable' property is set to false for a Constraint (In the property view model), only the static rules will be taken into account.
+
+[[File:images/fig5.png|The constraint cannot be dynamically overridden]]
+
+The automatic rules are the following:
+
+* A constraint with a multiplicity of 1 always overrides the same constraint with a multiplicity of -1 (Or >1). Thus, 'MultipleClass' won't be displayed, because 'SingleClass' also matches our selection.
+* An EMF (Or UML) 'Instance of' constraint always overrides a constraint matching a supertype. Thus, 'SingleClassifier' won't be displayed, because a Class is more specific than a Classifier. However, 'SingleElement' *will be* displayed, because it is not overrideable (isOverrideable=false).
+* A stereotype constraint (HasStereotype) will *not* override its UML 'Instance of' constraint. However, a specific implementation of this constraint has been provided for Scade, which *will* override the UML metaclass (i.e., a Block will override a Class' property view, hiding the UML tab).
+* For CompositeConstraints: if a composite constraint is a superset of another constraint, it will override it (It is more specific). For example, a Composite Constraint 'isA and isB' will override a constraint 'isB', but will not override a constraint 'isB and isC'.
+
+Please note that each constraint has its own implementation of the overrides() method. See the advanced chapter for more information
+
+The static rule is simple: when a Constraint explicitly overrides another constraint, it will always override it. This is especially useful when you've marked a constraint as 'overrideable=false', but still want to override it in a specific case (Remember that overrideable=false only applies to *automatic* constraint resolution).
+
+[[File:images/fig6.png|Force this constraint to override another constraint]]
+
+
+Finally, in the previous example, the following views will be displayed:
+
+* SingleClass (Overrides MultipleClass, Single/MultipleClassifier ; UML Tab)
+* SingleElement (overrideable=false ; Profile tab)
+* FillStyle, FontStyle, LineStyle (Appearance tab)
+* StereotypeDisplay (overrideable=false ; Appearance tab)
+
+====Preferences====
+
+When you make a copy of a property view, it is not automatically activated. Thus, the modifications brought to the copy are not immediately visible on your property view. To activate a property view, you need to open the Papyrus preferences, from Window > Preferences.
+
+[[File:images/fig7.png|Preferences]]
+
+When making a copy of an existing configuration, you should uncheck the default one, and check the new one.
+
+===Advanced Customization===
+
+The customization tool only allows basic operations, such as adding, removing or reordering properties.
+
+The property view framework is much more powerful, but this requires some Java development. This chapter will focus on the advanced customization of the property view.
+
+====The Environment model====
+
+To associate Java implementations with the property view model, you need to declare an Environment model. You can create a new Environment model with the 'Environment Model' wizard in 'Example EMF Model Creation Wizards' category. Select 'Environment' as the Model Object.
+
+Once you've added your Java class declarations, you should register the environment model so that the property view knows about it. Add an extension to org.eclipse.papyrus.properties.environment, and select your model file.
+
+====Create a new widget====
+
+You can create new widgets for the property view. There are four kinds of graphical elements: CompositeWidget, Layout, StandardWidget and PropertyEditor.
+The widgets contain three common fields:
+
+* Label: The label displayed in the Customization editor when the user selects a widget type.
+* Namespace: The XWT namespace associated to the Widget.
+* WidgetClass: The simple name of the Java class implementing the Widget.
+
+The PropertyEditor contains two additional fields:
+
+* Multiplicity: The multiplicity of the properties it can handle (1 for single-valued properties, -1 for multivalued properties)
+* Type: The type of the properties it can handle.
+
+To implement a Composite, Layout or Standard widget, you should simply follow the SWT rules, i.e. extend either Composite, Canvas or Layout, and have a (Composite, int) constructor. To define a PropertyEditor, you have two options:
+
+* Extend Composite, have a (Composite, int) constructor, and implement the CustomizablePropertyEditor interface (From org.eclipse.papyrus.properties.widgets)
+* Extend directly AbstractPropertyEditor (From org.eclipse.papyrus.properties.widgets)
+
+====Constraints====
+
+Adding a Constraint is similar to creating a new Widget. You have two options to implement a new Constraint:
+
+* Implement the Constraint interface (From org.eclipse.papyrus.properties.constraints)
+* Extend the AbstractConstraint class (From org.eclipse.papyrus.properties.constraints)
+
+The important methods are the following (depending on whether you're implement Constraint or extending AbstractConstraint):
+
+* setDescriptor/setConstraintDescriptor:
+** Configures the constraint.
+* match(Object)/match(IStructuredSelection) : Boolean
+** Indicates whether this constraint matches the given given or not
+* overrides(Constraint) : Boolean
+** Indicates whether this constraint overrides another constraint or not. A constraint should override another constraint when it is more specific.
+* equivalent(Constraint) : Boolean
+** This is only used by AbstractConstraint. Two constraints are equivalent if they have the same parameters (ConstraintDescriptor). Two equivalent constraints can have different multiplicities.
+
+The equivalent() and overrides() methods are used to automatically resolve constraints conflicts (Two different constraints matching the same element).
+Once the Constraint is implemented, don't forget to register it in your environment model.
+
+====ModelElement====
+
+The ModelElement is the interface between the property view and your domain model. It is used to retrieve information about the object(s) being edited from the property. These informations will be used to configure the widget. AbstractModelElement provides a base implementation for this interface.
+
+All methods from this interface take a single parameter, which is the name of the property being edited.
+
+* getObservable(String) / doGetObservable(String) :
+
+This method returns an IObservable which will be used to read and write a single property from the represented object. It should return an IObservableValue for single-valued properties, and IObservableList for multi-valued properties.
+
+* getContentProvider(String) :
+
+This method is only used for reference and enumerated properties. It should return a list of values which can be set to the edited property. Unlike IStructuredContentProvider, this provider will not rely on a StructuredViewer to retrieve an input object: the method getElement() will be called without any parameter, so the implementation should be able to retrieve its own typically. This will typically be achieved by passing a context object in the provider's constructor.
+
+* getLabelProvider(String) :
+
+This method is used to display an element's label for a few widgets. Note that the same instance of label provider can be used by more than one Viewer for a given property. For example, the MultiReference widget will display three viewers, each using the same label provider. Each viewer will try to dispose the LabelProvider as soon as they are themselves disposed (For example, when closing the selection dialog from MultiReference). Thus, you should probably not implement the dispose() method, to avoid inconsistent providers.
+
+* getValidator(String) :
+
+This method returns an IValidator, if there's one which is set up for the current property.
+
+====ModelElement Factory====
+
+The ModelElements are associated to DataContextElements through a ModelElementFactory. The ModelElementFactory is defined on the DataContextRoot. All children of a DataContextRoot will share the same ModelElementFactory.
+
+To add a new ModelElement, you should also create a new ModelElementFactory, and register it in your Environment model. Then, you can set this factory to your DataContextRoot.
+
+Note: to display the Data contexts, you need to check the toggle button on top of the editor: [[File:images/fig8.png]]
+
+[[File:images/fig9.png|The UML DataContextRoots, with their own factories]]
+
+====Content Providers and Widgets====
+
+Note: The ContentProviders have been refactored in Papyrus 0.9, to be simplified. However, most of this chapter should remain true.
+
+The ContentProvider is a complex features, which often evolves in the Papyrus property view. The ModelElement has been designed to be compatible with many kinds of different widgets (Combo-box, Tree-based dialogs'). The problem is that these widgets typically use different kinds of JFace ContentProvider (IStructuredContentProvider for flat display, ITreeContentProvider for Tree display). In the Property view, we needed to unify these providers.
+
+Thus, it is recommended to use a IHierarchicContentProvider, which extends ITreeContentProvider, with an additional method: isValidValue(Object). In a Tree, we typically have two kinds of elements: the elements which can potentially be selected, and their containers, which often cannot. The isValidValue() method is used to distinguish between these values.
+
+When a flat widget (e.g. ReferenceCombo) is used, only the valid values will be displayed. When a tree-based widget (e.g. ReferenceDialog) is used, a sub-tree will be displayed, excluding the sub-trees which don't contain any valid value. Moreover, the invalid values won't be selectable (For example, in the ReferenceDialog, the 'ok' button will be grayed).
+
+[[File:images/fig10.png|IHierarchicContentProvider at runtime]]
+
+====Dynamic sections====
+
+Sometimes, the property view should not depend on a selection, but on a specific property of the selected element. In such a case, it is frequent that this specific property might be edited by the property view itself. However, the property view is only refreshed when the selection changes.
+
+To overcome this problem, Papyrus offers a 'Dynamic section' feature, which allows refreshing dynamically one or more sections of the property view. For example, when you're editing a View's constraint in the Property view Editor, the constraint's properties directly depend on the constraint's type. When you select an UML constraint, the constraint's parameter is the name of a UML Metaclass. When you select an EMF constraint, the constraint has two parameters: Namespace URI of the Metamodel, and the name of the Metaclass. Changing the constraint type should also change the constraint's parameters editors.
+
+[[File:images/fig11.png|A view with a static and a dynamic section]]
+
+This can be achieved with dynamic sections, i.e. a section with a constraint. The constraint will be executed once at the beginning, and once again each time a property from the property view changes. If the constraint is matched, the section will be displayed. Otherwise, it will be hidden.
+A view with dynamic sections will typically look like the following:
+
+* A single unconstrained section containing the common parameters
+* One dynamic (i.e. constrained) section for each specific case
+
+[[File:images/fig12.png|Dynamic sections configuration]]
+
+Please note that tabs cannot be added nor removed dynamically. For example, when you apply a stereotype on a UML Element, the tab associated to the stereotype's property view cannot be displayed until you select the element again.
+
+====Property view Header====
+The Eclipse Tabbed Property View offers an extension point to define the label provider for the property view header. However, this label provider will be specific to the editor. For generic editors, it is not always possible to provide a pertinent label provider: they will always be too generic, and won't be able to handle specific elements. For example, a generic EMF Model Editor with the customizable property view will only be able to display standard EMF labels and icons. To overcome this problem, Papyrus offers a configurable label provider for the header: org.eclipse.papyrus.properties.provider.SelectionLabelProvider
+
+This label provider uses the selected element to find the most appropriate label provider, then dispatches the getText and getIcon calls to it. This label provider can be configured through an extension point: org.eclipse.papyrus.properties.labelprovider
+
+This extension point takes an implementation of IFilteredLabelProvider and a priority. The IFilteredLabelProvider is a label provider with an additional method: boolean accept(IStructuredSelection). For each selection, the label provider accepting the selection, and having the highest priority will be used to display a header for it. It will then be possible to define a generic label provider for all java objects, with the lowest priority; another generic label provider for all EMF Objects, and a really specific label provider for a given metamodel (with the highest priority).
+In Papyrus, we have such an example for UML. The Papyrus UML Diagrams use the GMF model, which doesn't have icons. We wanted to have a different icon for each type of Diagram: this is not possible with a standard EMF label provider, which associates an icon to an EClass, independently of its instances' attributes.
+
+So, we registered the standard EMF Label Provider with a medium priority, which can handle any kind of EObject, and a UML Label Provider, which can only handle UML Elements and GMF Diagrams, with a higher priority.
+
+The lower the priority number, the higher the priority actually is:
+
+* 100: Lowest priority. The standard EMF Object label provider has a priority of 100, and is called iff no other label provider can accept an EObject.
+* 50: Medium priority. The Papyrus UML Label Provider has a priority of 50.
+* 10: High priority.
+* 0: Highest priority.
+
+If no label provider matches the selection, the default JFace LabelProvider is used.
+
+====Binding and Validation====
+
+View Properties support JFace Databinding, which connects our UI to our model. For the validation there are two kinds of validators:
+
+* Widget validators: they check that our input is the kind of data expected by our widget before synchronizing it ( e.g IntegerEditor must have a correct integer for input)
+
+* Model validators: they check that our input verifies our model constraint, they must be instantiate in UmlModelElement#getValidator();
+
+If there are errors during the binding a control decoration is shown next to the widget. It also supports three level of severity (Ok, Warning, Error).
+
+[[File:images/fig13.png|Example of binding with a model validator and warning severity result]]
+
+====Field coloration====
+
+Properties views have fields' coloration. If you modify a value the background of the field will be orange, when you validate a change the background will turn green for couple of seconds if the synchronization was successful, it will turn red otherwise.
+
+[[File:images/fig14.png|Example of a field being modified]]
+
+===Generation Tool===
+
+Editing an existing property view can be useful, but most of the time, you'll want a brand new configuration for your own profile or meta-model. Thus, the framework provides a tool to automatically generate the initial property view, which you can then customize using the customization tool.
+The generator can create a property view configuration from either a UML Profile or an Ecore Meta-model. The wizard is available in the Papyrus category: File -> New -> Other' -> Papyrus/Property view configuration.
+
+The wizard provides two default generators:
+
+* Generate a property view from a UML Profile
+* Generate a property view from an Ecore Meta-model
+
+The source file must be located in your workspace. A default target file named will be filled with the .ctx extension (This is the extension for a property view configuration).
+
+Press next: a combo asks you which strategy to use.
+
+A basic method: all the elements from the profile or meta-model will be extracted, with no dependencies to other models.
+
+Same CTX file: you are asked to choose which models you want to extract, and will be saved in the same file
+
+Different CTX file(s): you are asked to choose which models you want to extract and they will be saved in different files, (each profile name will be the name of the generated ctx file)
+
+Press next: a table with all the elements extracted from your profile or meta-model is displayed. This table contains four columns:
+
+* Field: the name of the element or property
+* Display single: whether this property should be displayed when a single instance of this element is selected
+* Display multiple: whether this property should be displayed when more than one instance of this element is selected
+* Description: the description of the property (Most of the time, it will be N/A, as the default generators cannot extract the documentation from the source model).
+
+Press finish: two files or more files according to the chosen strategy and a folder are generated:
+
+* The *.ctx file, corresponding to your property view configuration
+* The ui/ folder, containing a set of XWT files, which contain the graphical information of your property views
+* The *FieldSelection.xmi file, which reminds the choices you've made about displaying each property. This file is currently unused.
+
+You can now open the *.ctx file and customize your property view.
+
+
+===Deploying a property view===
+
+Papyrus provides a simple tool to deploy a property view locally (Right click on a CTX file -> Deploy/Undeploy)
+
+==Multipllicity Editor==
+===Description===
+The multiplicity editor contains two modes of edition:
+* The '''simple''' mode which allows to edit the lower and the upper values from a unique editor
+* The '''advanced''' mode which allows to edit the lower and the upper values from two editors of ValueSpecification.
+
+===Usage===
+====Simple mode====
+The simple mode is represented as the following:
+
+[[File:images/simpleMode.png]]
+
+This editor must be filled by the following pattern:
+{| class="wikitable" border="1" cellspacing="0"
+! Value filled
+! Lower value
+! Upper value
+|-
+| 1
+| <code>null</code> (default value is '''1''')
+| <code>null</code> (default value is '''1''')
+|-
+| x..y
+| <code>LiteralInteger</code> with value '''x'''
+| <code>LiteralUnlimitedNatural</code> with value '''y'''
+|-
+| x..*
+| <code>LiteralInteger</code> with value '''x'''
+| <code>LiteralUnlimitedNatural</code> with value '''-1''' (interpreted as <code>*</code>)
+|-
+| x
+| <code>LiteralInteger</code> with value '''x'''
+| <code>LiteralUnlimitedNatural</code> with value '''x'''
+|}
+
+The values set as lower and upper are always positive (except the <code>*</code> for the upper which is valued as '''-1''').
+
+This editor is usable only when the lower ValueSpecification is a <code>LiteralInteger</code> or <code>null</code> and when the upper ValueSpecification is a <code>LiteralUnlimitedNatural</code> or <code>null</code>.
+On the other hand, this editor will be displayed like the following:
+
+[[File:images/simpleModeDisabled.png]]
+
+====Advanced mode====
+=====Simple ValueSpecification editor=====
+The advanced mode with simple ValueSpecificatiton editors is represented as the following:
+
+[[File:images/advancedMode.png]]
+
+The lower and the upper ValueSpecification can be created/edited/deleted by the buttons:
+
+[[File:images/buttonsEdit.png]]
+
+=====XText ValueSpecification editor=====
+The advanced mode with XText ValueSpecification editors is represented as the following:
+
+[[File:images/advancedModeXText.png]]
+
+This editor use the XText ValueSpecification editors (explain [[Papyrus_User_Guide#UML_ValueSpecification_editor|here]]) with some specificities depending on lower or upper value edition.
+
+The specificity of the '''lower''' ValueSpecification edition is when the value filled is an integer, this one will be handled as <code>LiteralInteger</code> instead of <code>LiteralUnlimitedNatural</code> or <code>LiteralInteger</code> (the <code>*</code> value will create an <code>OpaqueExpression</code>).
+
+The specificity of the '''upper''' ValueSpecification edition is when the value filled is an integer or <code>*</code>:
+* if the integer is '''positive or -1''', a <code>LiteralUnlimitedNatural</code> will be created
+* if the integer is '''negative''', an <code>OpaqueExpression</code> will be created instead of <code>LiteralInteger</code>
+
+====Switch modes====
+This is possible to switch between the two modes by two ways:
+* The button in the multiplicity editor:
+
+[[File:images/buttonSwitch.png]]
+
+* The '''multiplicity editor''' preferences in the '''property views''' preferences:
+
+[[File:images/preferencesMultiplicityEditor.png]]
+
+Regarless of the way used to switch modes, the mode used is saved in the preferences and will be used for each multiplicity in Papyrus. \ No newline at end of file
diff --git a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
index e93975eabfb..656c9b7a877 100644
--- a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
+++ b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
@@ -1,25 +1,75 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor"
- contributorClass="org.eclipse.papyrus.editor.PapyrusActionBarContributor"
- default="true"
- extensions="di"
- icon="icons/papyrus/Papyrus_16x16.gif"
- id="org.eclipse.papyrus.infra.core.papyrusEditor"
- matchingStrategy="org.eclipse.papyrus.editor.PapyrusMatchingStrategy"
- name="Papyrus Editor Core">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <category
- description="this a category of papyrus commands"
- id="org.eclipse.papyrus.editor.category"
- name="Papyrus Category">
- </category>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension point="org.eclipse.ui.editors">
+ <editor
+ class="org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor"
+ contributorClass="org.eclipse.papyrus.editor.PapyrusActionBarContributor"
+ default="true"
+ extensions="di"
+ icon="icons/papyrus/Papyrus_16x16.gif"
+ id="org.eclipse.papyrus.infra.core.papyrusEditor"
+ matchingStrategy="org.eclipse.papyrus.editor.PapyrusMatchingStrategy"
+ name="Papyrus Editor Core">
+ </editor>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ description="this a category of papyrus commands"
+ id="org.eclipse.papyrus.editor.category"
+ name="Papyrus Category">
+ </category>
+
+ <command
+ categoryId="org.eclipse.ui.category.navigate"
+ id="org.eclipse.papyrus.editor.nextTabCommand"
+ name="Next Tab">
+ </command>
+ <command
+ categoryId="org.eclipse.ui.category.navigate"
+ id="org.eclipse.papyrus.editor.previousTabCommand"
+ name="Previous Tab">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.bindings">
+ <key
+ commandId="org.eclipse.papyrus.editor.nextTabCommand"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="CTRL+TAB">
+ </key>
+ <key
+ commandId="org.eclipse.papyrus.editor.previousTabCommand"
+ contextId="org.eclipse.ui.contexts.window"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="CTRL+M2+TAB">
+ </key>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.editor.handlers.NextTabHandler"
+ commandId="org.eclipse.papyrus.editor.nextTabCommand">
+ <activeWhen>
+ <with variable="activeEditorId">
+ <equals value="org.eclipse.papyrus.infra.core.papyrusEditor"/>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.editor.handlers.PreviousTabHandler"
+ commandId="org.eclipse.papyrus.editor.previousTabCommand">
+ <activeWhen>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ </activeWhen>
+ </handler>
+ </extension>
+
+</plugin>
diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java
new file mode 100644
index 00000000000..99f02589ba2
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/NextTabHandler.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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:
+ * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.editor.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * The handler for the next tab command that lets the user navigate to
+ * the next page of the active tab-folder with Ctrl+Tab
+ *
+ * @author Shuai Li
+ */
+public class NextTabHandler extends TraverseTabHandler {
+ public NextTabHandler() {
+ super(false);
+ }
+}
diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java
new file mode 100644
index 00000000000..ae42ef0170c
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/PreviousTabHandler.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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:
+ * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.editor.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * The handler for the previous tab command that lets the user navigate to
+ * the previous page of the active tab-folder with Ctrl+Shift+Tab
+ *
+ * @author Shuai Li
+ */
+public class PreviousTabHandler extends TraverseTabHandler {
+ public PreviousTabHandler() {
+ super(true);
+ }
+}
diff --git a/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java
new file mode 100644
index 00000000000..dba5f87e2e9
--- /dev/null
+++ b/plugins/editor/org.eclipse.papyrus.editor/src/org/eclipse/papyrus/editor/handlers/TraverseTabHandler.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST and others.
+ *
+ * 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:
+ * Shuai Li (CEA LIST) <shuai.li@cea.fr> - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.editor.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.papyrus.editor.Activator;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The handler for the next/previous tab commands that let the user navigate to
+ * the next/previous page of the active tab-folder with Ctrl+Shift/Ctrl+Shift+Tab
+ *
+ * @author Shuai Li
+ */
+public abstract class TraverseTabHandler extends AbstractHandler {
+ private final boolean isPrevious;
+
+ public TraverseTabHandler() {
+ isPrevious = false;
+ }
+
+ public TraverseTabHandler(boolean isPrevious) {
+ this.isPrevious = isPrevious;
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (activeWorkbenchWindow != null) {
+ IWorkbenchPart activePart = activeWorkbenchWindow.getActivePage().getActivePart();
+
+ if (activePart instanceof PapyrusMultiDiagramEditor) {
+ PapyrusMultiDiagramEditor papyrusEditor = (PapyrusMultiDiagramEditor) activePart;
+ try {
+ IPage nextPage = null;
+ if (isPrevious) {
+ nextPage = papyrusEditor.getISashWindowsContainer().getPreviousPage();
+ } else {
+ nextPage = papyrusEditor.getISashWindowsContainer().getNextPage();
+ }
+
+ papyrusEditor.getISashWindowsContainer().selectPage(nextPage);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java
index a559d16e237..94e96cf856f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/editor/ISashWindowsContainer.java
@@ -1,145 +1,159 @@
-package org.eclipse.papyrus.infra.core.sasheditor.editor;
-
-import java.util.List;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
-import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
-import org.eclipse.ui.IEditorPart;
-
-public interface ISashWindowsContainer {
-
- /**
- * Get the currently active editor, or null if none is active.
- *
- * @return
- */
- public abstract IEditorPart getActiveEditor();
-
- /**
- * Get the currently active SashWindows Page.
- * This is s
- *
- * @return An {@link IPage} allowing to access current page data.
- */
- public abstract IPage getActiveSashWindowsPage();
-
- /**
- * Get the {@link ITabFolderModel} of the currently selected folder.
- *
- * @return
- */
- public ITabFolderModel getSelectedTabFolderModel();
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- public List<IPage> getVisiblePages();
-
- /**
- * Return a list of all folders opened in this SashContainer. The list should only
- * be used as a 'view' list. It should not be modified or written. The list
- * is observable.
- *
- * @return a read only and observable list of {@link IFolder}.
- */
- public IObservableList<IFolder> getIFolderList();
-
- /**
- * Get the list of visible IEditorPart obtain from the pages of type IEditorPage.
- * The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- public List<IEditorPart> getVisibleIEditorParts();
-
- /**
- * The <code>AbstractMultiPageSashEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested
- * editor, if there is one.
- * <p>
- * Subclasses may extend or reimplement.
- * </p>
- */
- public abstract void setFocus();
-
- /**
- * Refresh the SashWindows.
- * Synchronize the internal structure with the {@link ISashWindowsContentProvider}.
- */
- public abstract void refreshTabs();
-
- /**
- * Add a PageChangedListener to the list of listeners.
- *
- * @param pageEventsManager
- */
- public abstract void addPageChangedListener(IPageChangedListener pageChangedListener);
-
- /**
- * Remove the PageChangedListener from the list of listeners.
- *
- * @param pageEventsManager
- */
- public abstract void removePageChangedListener(IPageChangedListener pageChangedListener);
-
- /**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener);
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener);
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- public void addFolderTabMouseEventListener(ITabMouseEventsListener listener);
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener);
-
- /**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
- *
- * @param menuManager
- * The {@link MenuManager} used to create the menu on the tab area.
- */
- public abstract void setFolderTabMenuManager(MenuManager menuManager);
-
- public abstract IPage lookupIPageByIEditorPart(IEditorPart editor);
-
- public abstract IPage lookupModelPage(Object rawModel);
-
- public abstract void selectPage(IPage page);
-
- public abstract void visit(IPageVisitor pageVisitor);
-
- /**
- * @return <code>true</code> if already disposed
- */
- public boolean isDisposed();
-}
+package org.eclipse.papyrus.infra.core.sasheditor.editor;
+
+import java.util.List;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
+import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
+import org.eclipse.ui.IEditorPart;
+
+public interface ISashWindowsContainer {
+
+ /**
+ * Get the currently active editor, or null if none is active.
+ *
+ * @return
+ */
+ public abstract IEditorPart getActiveEditor();
+
+ /**
+ * Get the currently active SashWindows Page.
+ * This is s
+ *
+ * @return An {@link IPage} allowing to access current page data.
+ */
+ public abstract IPage getActiveSashWindowsPage();
+
+ /**
+ * Get the {@link ITabFolderModel} of the currently selected folder.
+ *
+ * @return
+ */
+ public ITabFolderModel getSelectedTabFolderModel();
+
+ /**
+ * Get the list of visible IPages. The visible IPages are the one that have there diagram area
+ * visible.
+ *
+ * @return
+ */
+ public List<IPage> getVisiblePages();
+
+ /**
+ * Get the next IPage in the tabs list.
+ *
+ * @return
+ */
+ public IPage getNextPage();
+
+ /**
+ * Get the next IPage in the tabs list.
+ *
+ * @return
+ */
+ public IPage getPreviousPage();
+
+ /**
+ * Return a list of all folders opened in this SashContainer. The list should only
+ * be used as a 'view' list. It should not be modified or written. The list
+ * is observable.
+ *
+ * @return a read only and observable list of {@link IFolder}.
+ */
+ public IObservableList<IFolder> getIFolderList();
+
+ /**
+ * Get the list of visible IEditorPart obtain from the pages of type IEditorPage.
+ * The visible IPages are the one that have there diagram area
+ * visible.
+ *
+ * @return
+ */
+ public List<IEditorPart> getVisibleIEditorParts();
+
+ /**
+ * The <code>AbstractMultiPageSashEditor</code> implementation of this <code>IWorkbenchPart</code> method sets focus on the active nested
+ * editor, if there is one.
+ * <p>
+ * Subclasses may extend or reimplement.
+ * </p>
+ */
+ public abstract void setFocus();
+
+ /**
+ * Refresh the SashWindows.
+ * Synchronize the internal structure with the {@link ISashWindowsContentProvider}.
+ */
+ public abstract void refreshTabs();
+
+ /**
+ * Add a PageChangedListener to the list of listeners.
+ *
+ * @param pageEventsManager
+ */
+ public abstract void addPageChangedListener(IPageChangedListener pageChangedListener);
+
+ /**
+ * Remove the PageChangedListener from the list of listeners.
+ *
+ * @param pageEventsManager
+ */
+ public abstract void removePageChangedListener(IPageChangedListener pageChangedListener);
+
+ /**
+ * Add a listener on Page LifeCycle events.
+ * This implementation delegates to the internal PageTracker.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param listener
+ *
+ */
+ public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener);
+
+ /**
+ * Remove a listener on Page LifeCycle events.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param listener
+ *
+ */
+ public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener);
+
+ /**
+ * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
+ *
+ * @param listener
+ */
+ public void addFolderTabMouseEventListener(ITabMouseEventsListener listener);
+
+ /**
+ * Remove a listener on Page LifeCycle events.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param listener
+ *
+ */
+ public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener);
+
+ /**
+ * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
+ *
+ * @param menuManager
+ * The {@link MenuManager} used to create the menu on the tab area.
+ */
+ public abstract void setFolderTabMenuManager(MenuManager menuManager);
+
+ public abstract IPage lookupIPageByIEditorPart(IEditorPart editor);
+
+ public abstract IPage lookupModelPage(Object rawModel);
+
+ public abstract void selectPage(IPage page);
+
+ public abstract void visit(IPageVisitor pageVisitor);
+
+ /**
+ * @return <code>true</code> if already disposed
+ */
+ public boolean isDisposed();
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java
index d32e94b8dc5..c141eb52742 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor/src/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainer.java
@@ -1,1362 +1,1464 @@
-/*****************************************************************************
- * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
- *
- * 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:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 437217
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.core.sasheditor.internal;
-
-import static org.eclipse.papyrus.infra.core.sasheditor.Activator.log;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.util.Geometry;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IFolder;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageLifeCycleEventsListener;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
-import org.eclipse.papyrus.infra.core.sasheditor.editor.ITabMouseEventsListener;
-import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.Cursor;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.internal.DragCursors;
-import org.eclipse.ui.internal.dnd.DragUtil;
-import org.eclipse.ui.internal.dnd.IDragOverListener;
-import org.eclipse.ui.internal.dnd.IDropTarget;
-
-
-/**
- * Main entry class of the SashWindows system.
- * This class allows to have a multitab window with sashes.
- * The class require a ContentProvider describing the content to be shown.
- *
- * @author dumoulin
- */
-@SuppressWarnings("restriction")
-public class SashWindowsContainer implements ISashWindowsContainer {
-
- /**
- * The content provider describing the sashes, folders and tabs.
- */
- private ISashWindowsContentProvider contentProvider;
-
- /**
- * The manager used to get Main editor properties like Site, ActionBars, ...
- */
- private IMultiEditorManager multiEditorManager;
-
- /**
- * Tracker tracking the current active page. The tracker also disconnect last active page and connect
- * the new one.
- */
- private ActivePageTracker activePageTracker;
-
- /**
- * Event provider firing Pages life cycle events to registered listeners. Inner parts call the fireXxxEvents
- * when appropriate.
- */
- private SashContainerEventsProvider lifeCycleEventProvider;
-
- /**
- * Event provider firing Folder life cycle events to registered listeners. Inner parts call the fireXxxEvents
- * when appropriate.
- */
- private SashContainerFolderEventsProvider folderLifeCycleEventProvider;
-
- /**
- * Event provider firing mouse events from tabs.
- *
- */
- private TabMouseEventsProvider tabMouseEventsProvider;
-
- /**
- * A manager used to maintain a view list of available {@link TabFolderPart}. This list should
- * only be used in a READ way. It should not be modified by something else than its manager.
- *
- */
- private TabFolderListManager folderListManager;
-
- /**
- * The part used as root. We use an extra class as root in order to separate the code dedicated to
- * ITilePart.
- */
- private RootPart rootPart;
-
- /**
- * The SWT container associated to this part. This is generally the container of the
- * parent.
- */
- private Composite container;
-
- /**
- * The drop target.
- */
- protected DropTarget dropTarget;
-
- /** A flag that indicates that the model is being synchronized. */
- private AtomicBoolean isRefreshing = new AtomicBoolean(false);
-
- /**
- * The cached value of the menu manager, if any.
- */
- private MenuManager folderTabMenuManager;
-
- /**
- * Listener on widget diposed event.
- */
- private DisposeListener widgetDisposedListener = new DisposeListener() {
-
- /**
- * Called when the widget is disposed.
- *
- * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
- *
- * @param e
- */
- @Override
- public void widgetDisposed(DisposeEvent e) {
- // We dispose the container.
- dispose();
- }
- };
-
- /**
- * Constructor.
- * Build a Container without IEditor management. Trying to add a EditorPart will result in an Exception.
- * The ContentProvider should not contain IEditorModel.
- */
- public SashWindowsContainer() {
- this(null);
- }
-
- /**
- * Constructor.
- * Build a container with EditorPart management. The container will allow to add EditorPart
- * (and thus IEditorModel to the ContentProvider).
- *
- * @param multiEditorManager
- * The manager allowing to use {@link IEditorModel} in the model.
- * If null, the sash will not render IEditorModel.
- *
- */
- public SashWindowsContainer(IMultiEditorManager multiEditorManager) {
- this.multiEditorManager = multiEditorManager;
- activePageTracker = new ActivePageTracker();
-
- if (multiEditorManager != null) {
- // Add listener on activePageChange.
- // This listener will take in charge editor services switching.
- activePageTracker.addActiveEditorChangedListener(new ActiveEditorServicesSwitcher(multiEditorManager.getEditorSite()));
- }
-
- // Life cycle event provider
- lifeCycleEventProvider = new SashContainerEventsProvider();
-
- // Tab mouve event provider
- tabMouseEventsProvider = new TabMouseEventsProvider();
-
- // Folder list view
- initTabFolderListManager();
- }
-
- /**
- * @return the contentProvider
- */
- protected ISashWindowsContentProvider getContentProvider() {
- // Content provider should have been set.
- assert (contentProvider != null);
- // Double check for development
- if (contentProvider == null) {
- throw new IllegalStateException("ContentProvider should be set before calling any method requiring it.");
- }
-
- return contentProvider;
- }
-
- /**
- * Set the content provider describing the sashes, folders and tabs.
- *
- * @param contentProvider
- * the contentProvider to set
- */
- public void setContentProvider(ISashWindowsContentProvider contentProvider) {
- // Use a delegate
- // The delegate is used as a central point performing calls to the
- // external implementation.
- this.contentProvider = new DelegateContentProvider(contentProvider);
- }
-
- /**
- * Creates control associated to this Container.
- * This method should be called when the parent is build.
- *
- * @param parent
- * The parent in which the editor should be created; must not be <code>null</code>.
- */
- public void createPartControl(Composite parent) {
- this.container = parent;
-
- rootPart = createRootPart();
- // Create the tree of tile part.
- rootPart.createPartControl(container);
- // TODO 20130205
- // Read lastActivePart from ContentProvider, and set it
- // before refresh. Like this, sash will select the last save page
-
- // Create children
- refreshTabs();
- // Set selection
- // TODO 20130205 remove next, because refresh already do it
- selectPage(lookupFirstValidPage());
-
- // postCreatePartControl();
- // TODO reactivate next
- initDrag(container);
- // activate();
-
- // Listen for disposale
- container.addDisposeListener(widgetDisposedListener);
- }
-
- /**
- * Create the root part for the model.
- */
- private RootPart createRootPart() {
- RootPart part = new RootPart(this);
- return part;
- }
-
- /**
- * Dispose the Container. All referenced resources will be disposed.
- * The container should not be used anymore once disposed.
- * The result of calling a method after a dispose() is unpredictable. <br>
- * This method can be called several times. <br>
- * <br>
- * How the method works:
- * <ul>
- * <li>The {@link SashWindowsContainer} has two trees, the SWT tree and a Part tree ({@link #rootPart}).</li>
- * <li>The SWT tree is disposed first.</li>
- * <ul>
- * <li>This prevent events fired from user interaction or from Widget modifiaction</li>
- * <li>The SWT disposal stop before nested editors SWT (thanks to the DISPOSE event in {@link EditorPart}). At this point, the nested editor dispose() method is called.</li>
- * <li>This allow to let the nested editor receive one single dispose call.</li>
- * <li></li>
- * </ul>
- * <li>The Part tree is disposed second (by calling rootPart.disposeThisAndChildren() )</li>
- * <ul>
- * <li>properties are cleaned in order to help the GC</li>
- * <li>swt controls are not disposed again</li>
- * </ul>
- * <li></li> <li></li> <li></li> <li></li> <li></li> </ul>
- *
- */
- public void dispose() {
- // Check if already disposed
- if (isDisposed()) {
- return;
- }
-
- // End disposing children's SWT controls.
- // It is possible to recall the dispose() method on a Widget, even if we are called by the dispose event.
- // Recalling the dispose method will continue disposing SWT children's.
-
- // DO NOT dispose the container composite, as we did not create it!
- if (container != null) {
- for (Control next : container.getChildren()) {
- next.dispose();
- }
- }
-
- // dispose part children
- if (rootPart != null) {
- // rootPart can be null if createPartControl has not been called.
- // This can happen in tests.
- rootPart.disposeThisAndChildren();
- }
-
- // clean up properties to help GC
- activePageTracker = null;
- container = null;
- contentProvider = null;
- dragOverListener = null;
- folderTabMenuManager = null;
- lifeCycleEventProvider = null;
- multiEditorManager = null;
- rootPart = null;
- }
-
- /**
- * Return true if the container is disposed, false otherwise.
- *
- * @return
- */
- @Override
- public boolean isDisposed() {
- // Use the activePageTracker as a flag.
- return activePageTracker == null;
- }
-
- /**
- * Notifies this page container that the specified page has been activated. This method
- * is called after the current tabs has been changed, either by refreshing the tabs, or by a user
- * UI action.
- * This method just set correctly the active page value in the Container, and fire pageChanged events if needed.
- * It does not change the selected page in the Part.
- *
- * Propagate the event to activePageTracker.
- * Removed since 0.10
- *
- * @param childPart
- */
- // protected void pageChanged(PagePart childPart) {
- // activePageTracker.setActiveEditor(childPart);
- // lifeCycleEventProvider.firePageActivatedEvent(childPart);
- // }
-
- /**
- * Notifies this page container that a pageChanged event has been fired by one swt Control.
- * This method is usually called after the user selects a different tab.
- *
- * The method notify the ContentProvider, and calls {@link #pageChanged(PagePart)}.
- * Removed since 0.10
- *
- * @param childPart
- */
- // protected void pageChangedEvent(PagePart childPart) {
- //
- // // Check if it is really a change before changing the model (which can throw change event)
- // // The folder model change is done before the tracker fires the listeners, like this
- // // listeners can check the model.
- // if(getActivePage() == childPart)
- // return;
- //
- // pageChanged(childPart);
- // }
-
- /**
- * Set the active page. The current active page will be the specified page. Throw events indicating that
- * the current ActivePage has changed. <br>
- * Do not set the activeSelection.
- *
- *
- * @param childPart
- */
- protected void setActivePage(PagePart childPart) {
-
- // Do nothing if the activePage has not changed
- if (childPart == null || getActivePage() == childPart) {
- return;
- }
-
- // TODO 20130205 remove next
- contentProvider.setCurrentFolder(childPart.getParent().getRawModel());
-
- activePageTracker.setActiveEditor(childPart);
- lifeCycleEventProvider.firePageActivatedEvent(childPart);
- }
-
- /**
- * This method allow to change current activePage. It set the activePage, and select it in
- * the folder. <br>
- * This method fires notifications (activePageChanged).
- *
- * @param newActivePage
- * The page that should become the active one.
- */
- protected void setActivePageAndSelection(PagePart newActivePage) {
-
- PagePart oldSelection = getActivePage();
- // First, set the selection, like this the observers will see the correct selection.
- synchronizeActiveSelection(newActivePage);
- try {
- // Set the active page
- setActivePage(newActivePage);
-
- } catch (RuntimeException e) {
- // Restore selection in case of exception
- synchronizeActiveSelection(oldSelection);
- // lets propagate
- throw e;
- }
- }
-
- /**
- * Synchronize the active selection to be the page of the activePage.
- * This should be called when the activePage is set, but the selection is not
- * yet set. <br>
- * This should not throw events (neither selctionChanged or pageChanged event).
- *
- */
- protected void synchronizeActiveSelection() {
- PagePart activePage = getActivePage();
-
- synchronizeActiveSelection(activePage);
- }
-
- /**
- * Synchronize the active selection to be the specified page. Do not synchronize with the activePage. <br>
- * This should not throw events (neither selctionChanged or pageChanged event).
- *
- * @param page
- */
- private void synchronizeActiveSelection(PagePart page) {
- if (page == null) {
- return;
- }
- TabFolderPart folder = page.getParent();
-
- // Folder can be null in case of tests
- if (folder != null) {
- folder.setSelection(page);
- }
-
- }
-
- /**
- * A change has happen in one of the inner parts. Relay the event.
- * This method is called by inner parts whenever the event happen in one of the part.
- * It collects and relay the firePropertyChange(int propertyId) calls from the inner IEditor.
- *
- * @param propertyId
- */
- protected void firePropertyChange(int propertyId) {
- // For now, we do nothing with this event.
- }
-
- /**
- * Create the part for the specified newModel.
- *
- * @param parent
- * The parent of the created part.
- * @param partModel
- * The model for which a part should be created.
- * @return
- */
- protected PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) {
-
-
- if (partModel instanceof IEditorModel) {
- // Check if we can use IEditorModel
- if (multiEditorManager == null) {
- throw new IllegalArgumentException("Container can't accept IEditorModel as no IMultiEditorManager is set. Please set a IMultiEditorManager.");
- }
-
- return new EditorPart(parent, (IEditorModel) partModel, rawModel, multiEditorManager);
- } else if (partModel instanceof IComponentModel) {
- return new ComponentPart(parent, (IComponentModel) partModel, rawModel);
- } else {
- // Return a default part
- }
-
- // TODO return a default part showing an error instead.
- throw new IllegalArgumentException("No Part found for the model '" + rawModel + "'");
- }
-
- /**
- * Get the {@link ITabFolderModel} of the currently selected folder.
- *
- * @return
- */
- @Override
- public ITabFolderModel getSelectedTabFolderModel() {
-
- // Get the activePage. The seleted folder is its parent.
- PagePart activePage = activePageTracker.getActiveEditor();
- if (activePage != null && activePage.getParent() != null) {
- return activePage.getParent().getPartModel();
- }
- // No active page exist, but their should be a folder
- TabFolderPart folder = lookupFirstValidFolder();
- return folder.getPartModel();
- }
-
- /**
- * Lookup the first valid folder in this sash system.
- * There is always a valid folder.
- *
- * @return The first valid folder.
- */
- private TabFolderPart lookupFirstValidFolder() {
-
- LookupFirstFolderVisitor visitor = new LookupFirstFolderVisitor();
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Get the active page.
- *
- * @return
- */
- private PagePart getActivePage() {
- return activePageTracker.getActiveEditor();
- }
-
- /**
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getActiveEditor()
- * @return
- *
- */
- @Override
- public IEditorPart getActiveEditor() {
- PagePart pagePart = getActivePage();
- if (pagePart instanceof EditorPart) {
- return ((EditorPart) pagePart).getIEditorPart();
- } else {
- return null;
- }
- }
-
- /**
- * Get the active page public API.
- *
- * @return
- */
- @Override
- public IPage getActiveSashWindowsPage() {
- return getActivePage();
- }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- @Override
- public List<IPage> getVisiblePages() {
- CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor();
-
- rootPart.visit(visitor);
-
- return visitor.getVisiblePages();
- }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- // public List<IEditorPage> getVisibleIEditorPages() {
- // CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor( IEditorPage.class);
- //
- // rootPart.visit(visitor);
- //
- // return visitor.getVisiblePages();
- // }
-
- /**
- * Get the list of visible IPages. The visible IPages are the one that have there diagram area
- * visible.
- *
- * @return
- */
- @Override
- public List<IEditorPart> getVisibleIEditorParts() {
- CollectVisibleIEditorPart visitor = new CollectVisibleIEditorPart();
- rootPart.visit(visitor);
-
- return visitor.getVisiblePages();
- }
-
-
- /**
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#setFocus()
- *
- */
- @Override
- public void setFocus() {
- setFocus(getActivePage());
- }
-
- /**
- * Sets focus to the control for the given page. If the page has an editor,
- * this calls its <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control for the page.
- *
- * @param pageIndex
- * the index of the page
- */
- private void setFocus(PagePart part) {
- if (part != null) {
- part.setFocus();
- }
- }
-
-
- /**
- * Refresh the tabs.
- * Is we are already currently refreshing, simply return.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
- *
- */
- @Override
- public void refreshTabs() {
-
- // Check if we arent already refreshing
- if (isRefreshing.compareAndSet(false, true)) {
- try {
- refreshTabsInternal();
- } finally {
- isRefreshing.set(false);
- }
- } else {
- log.warn("refresh inside refresh !");
- }
-
- }
-
- /**
- * Refresh the tab of the page, (i.e the name and icon in the page's tab).
- *
- * @param page
- * The page for which the name and icon should be refreshed.
- */
- public void refreshPageTab(IPage page) {
- if (page instanceof PagePart) {
- ((PagePart) page).refreshTab();
- } else {
- // TODO : lookup for the corresponding PagePart, and call refresh.
-
- }
- }
-
- /**
- * Real implementation of refreshTab.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
- *
- */
- private void refreshTabsInternal() {
- // System.out.println("start synchronize2() ------------------------");
- // showTilesStatus();
-
- // Get the currently selected folder
- PagePart oldActivePage = getActivePage();
-
- // Do refresh
- container.setRedraw(false);
- // Create map of parts
- // PartMap<T> partMap = new PartMap<T>();
- PartLists garbageMaps = new PartLists();
- rootPart.fillPartMap(garbageMaps);
-
- // Synchronize parts
- rootPart.synchronize2(garbageMaps);
-
-
- // Remove orphaned parts (no more used)
- garbageMaps.garbage();
-
- // set active page if needed
- setActivePageAndSelection(checkAndGetActivePage(oldActivePage, garbageMaps));
-
- // Reenable SWT and force layout
- container.setRedraw(true);
- container.layout(true, true);
- // System.out.println("end synchronize2() ------------------------");
- // showTilesStatus();
- }
-
- /**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired.
- * This is the programatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
- * Removed since 0.10
- *
- * @param page
- * The page to select or null.
- */
- // protected void selectPage(PagePart page) {
- // if(page == null)
- // return;
- // TabFolderPart folder = page.getParent();
- // folder.setActiveEditor(page);
- // }
-
- /**
- * Select the specified page in the Parts. The specified page will becomes the active one.
- * Appropriate events are fired if needed.
- * This is the programmatic counterpart of selecting a page in the UI.
- * If the provided page is null, do nothing.
- *
- * @param page
- * The page to select or null. The IPage should
- * be an instance previously returned by the SashContainer.
- *
- */
- @Override
- public void selectPage(IPage page) {
- if (page == null) {
- return;
- }
-
- // check if we are a correct instance.
- if (!(page instanceof PagePart)) {
- return;
- }
-
- setActivePageAndSelection((PagePart) page);
- }
-
- /**
- * Lookup the {@link IPage} used to render the specified rawModel.
- *
- * @param rawModel
- * The model for which the IPage is requested.
- * If the model is not rendered, return null;
- *
- * @return The corresponding IPage or null if not found.
- */
- @Override
- public IPage lookupModelPage(Object rawModel) {
- // Use a visitor to lookup the first IPage
- LookupModelPageVisitor visitor = new LookupModelPageVisitor(rawModel);
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Lookup the {@link IPage} used to render the specified IEditorPart.
- *
- * @param editor
- * The IEditorPart for which the IPage is requested.
- * If the IEditorPart is not rendered, return null;
- *
- * @return The corresponding IPage or null if not found.
- */
- @Override
- public IPage lookupIPageByIEditorPart(IEditorPart editor) {
- // Use a visitor to lookup the first IPage
- LookupIPageByIEditorPartVisitor visitor = new LookupIPageByIEditorPartVisitor(editor);
- rootPart.visit(visitor);
- return visitor.result();
- }
-
- /**
- * Check if the oldActivePage still alive, and set it if needed.
- * If the oldActivePage is null, set an active page if one exist.
- * If the oldActivePage still alive, let it as the active one. If it is
- * disposed, get arbitrarily an active page if one exist.
- *
- * @param oldActivePage
- * @param partLists
- * @param garbageMaps
- * @return A valid active page or null if none exists.
- */
- private PagePart checkAndGetActivePage(PagePart oldActivePage, PartLists partLists) {
-
- // Check if there is a created page
- PagePart activePage = partLists.getFirstCreatedPage();
- if (activePage != null) {
- // There is a created page. Set it as the selected and active one
- return activePage;
- }
-
- // Check oldActivePage validity (in case it has been deleted)
- if (oldActivePage != null && !(oldActivePage.isOrphaned() || oldActivePage.isUnchecked())) {
- return oldActivePage;
- }
-
- // Get an active page if any
- return lookupFirstValidPage();
- }
-
- /**
- * Lookup for a valid active Page. Return null if none is found.
- * TODO Use a visitor to implements this method.
- *
- * @return
- */
- private PagePart lookupFirstValidPage() {
- // First get a list of active editors
- PartLists garbageMaps = new PartLists();
- rootPart.fillPartMap(garbageMaps);
- return garbageMaps.getFirstValidPage();
- }
-
- /**
- * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
- *
- * @param menuManager
- * The {@link MenuManager} used to create the menu on the tab area.
- */
- @Override
- public void setFolderTabMenuManager(MenuManager menuManager) {
- this.folderTabMenuManager = menuManager;
- // Set the MenuManager in each existing folder.
- // Use a visitor.
- SetFolderTabMenuVisitor visitor = new SetFolderTabMenuVisitor(menuManager);
- rootPart.visit(visitor);
- }
-
- /**
- * @return the menuManager
- */
- protected MenuManager getFolderTabMenuManager() {
- return folderTabMenuManager;
- }
-
- /**
- * Show the status of the different Tiles composing the sash system.
- * Used for debug purpose.
- */
- public void showTilesStatus() {
- ShowPartStatusVisitor visitor = new ShowPartStatusVisitor();
- rootPart.visit(visitor);
- }
-
-
- /**
- * Visit all the Pages (IEditorPage and IComponentPage), allowing to access to the public interface.
- */
- @Override
- public void visit(IPageVisitor pageVisitor) {
- PageVisitorWrapper visitor = new PageVisitorWrapper(pageVisitor);
- rootPart.visit(visitor);
- }
-
- /**
- * Visit the Part associated to the container. This method visibility is protected in order to be able to access it
- * from junit tests.
- * It is not intended to be used by public API or from outside.
- */
- protected void visit(IPartVisitor visitor) {
- rootPart.visit(visitor);
- }
-
- /* ***************************************************** */
- /* Drag and Drop methods */
- /* ***************************************************** */
-
- /**
- *
- */
- private void initDrag(Composite container) {
- DragUtil.addDragTarget(container, dragOverListener);
-
- }
-
- IDragOverListener dragOverListener = new IDragOverListener() {
-
- /**
- *
- * @see org.eclipse.ui.internal.dnd.IDragOverListener#drag(org.eclipse.swt.widgets.Control, java.lang.Object, org.eclipse.swt.graphics.Point, org.eclipse.swt.graphics.Rectangle)
- */
- @Override
- public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) {
- // TODO remove the cast by changing the method. Only folder can be source and target
- final TabFolderPart sourcePart = (TabFolderPart) rootPart.findPart(draggedObject); // (ITilePart) draggedObject;
- // Compute src tab index
- // TODO move that and previous in the sender of drag event. Use a class containing both as draggedObject.
- final int srcTabIndex = PTabFolder.getDraggedObjectTabIndex(draggedObject);
-
- // System.out.println("drag to position=" + position);
- Rectangle containerDisplayBounds = DragUtil.getDisplayBounds(container);
- AbstractPanelPart targetPart = null;
-
- // Check if the cursor is inside the container
- if (containerDisplayBounds.contains(position)) {
-
- if (rootPart != null) {
- targetPart = (AbstractPanelPart) rootPart.findPart(position);
- // System.out.println("targetPart=" + targetPart
- // + ", position=" + position
- // + "container.toControl(position)=" + container.toControl(position));
- }
-
- if (targetPart != null) {
- final Control targetControl = targetPart.getControl();
-
- final Rectangle targetBounds = DragUtil.getDisplayBounds(targetControl);
-
- int side = Geometry.getClosestSide(targetBounds, position);
- int distance = Geometry.getDistanceFromEdge(targetBounds, position, side);
-
- // Reserve the 5 pixels around the edge of the part for the drop-on-edge cursor
- // Check if the target can handle the drop.
- if (distance >= 5) {
- // Otherwise, ask the part if it has any special meaning for this drop location
- // TODO remove cast; change return type of findPart()
- IDropTarget target = targetPart.getDropTarget(draggedObject, sourcePart, position);
- if (target != null) {
- return target;
- }
- } else {
- // We are on the boarder, try to drop on the parent
- // Warning : the parent could be the rootPart
- // System.out.println("DropTarget near the border");
- }
- //
- if (distance > 30) {
- side = SWT.CENTER;
- }
- //
- // // If the part doesn't want to override this drop location then drop on the edge
- //
- // // A "pointless drop" would be one that will put the dragged object back where it started.
- // // Note that it should be perfectly valid to drag an object back to where it came from -- however,
- // // the drop should be ignored.
- //
- @SuppressWarnings("unused")
- boolean pointlessDrop = false;
-
- if (sourcePart == targetPart) {
- pointlessDrop = true;
- }
-
- return createDropTarget(sourcePart, srcTabIndex, side, side, targetPart);
- }
- } else {
- // Cursor is outside the container
- // System.out.println("Outside container bounds");
- // This will be used to create a new Window.
- // We only allow dropping into a stack, not creating one
- // if (differentWindows)
- // return null;
-
- int side = Geometry.getClosestSide(containerDisplayBounds, position);
-
- boolean pointlessDrop = false;
- int cursor = Geometry.getOppositeSide(side);
-
- if (pointlessDrop) {
- side = SWT.NONE;
- }
-
- return createDropTarget(sourcePart, srcTabIndex, side, cursor, null);
- }
- return null;
- }
-
- };
-
-
- /**
- * Create the drop target
- */
- private DropTarget createDropTarget(final TabFolderPart sourcePart, int srcTabIndex, int side, int cursor, AbstractPart targetPart) {
- if (dropTarget == null) {
- dropTarget = new DropTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
- } else {
- dropTarget.setTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
- }
- return dropTarget;
- }
-
- /**
- * Class implementing methods required by drop targets.
- */
- protected class DropTarget implements IDropTarget {
-
- int count = 0;
-
- int cursor = SWT.TOP;
-
- private int side;
-
- private AbstractPanelPart targetPart;
-
- private int srcTabIndex;
-
- private TabFolderPart sourcePart;
-
- /**
- * Constructor.
- */
- public DropTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
- this.cursor = cursor;
- this.side = side;
- this.sourcePart = sourcePart;
- this.srcTabIndex = srcTabIndex;
- this.targetPart = (AbstractPanelPart) targetPart;
- }
-
- public void setTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
- this.cursor = cursor;
- this.side = side;
- this.sourcePart = sourcePart;
- this.srcTabIndex = srcTabIndex;
- this.targetPart = (AbstractPanelPart) targetPart;
- }
-
- /**
- * A folder is dropped.
- *
- * @see org.eclipse.ui.internal.dnd.IDropTarget#drop()
- */
- @Override
- public void drop() {
- // @TODO remove next cast
- if (side == SWT.CENTER) { // Add to target folder
- contentProvider.movePage(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), -1);
- } else { // Create a new folder
- contentProvider.createFolder(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), side);
- }
- }
-
- /**
- * Return the cursor used during drag.
- *
- * @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor()
- */
- @Override
- public Cursor getCursor() {
- // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getCursor()-" + count++);
- return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor));
-
- }
-
- @Override
- public Rectangle getSnapRectangle() {
- // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getSnapRectangle(" + "sourcePart=" + sourcePart + ", targetPart=" + targetPart + ", side=" + side);
- Rectangle targetDisplayBounds;
-
- if (targetPart != null) {
- targetDisplayBounds = DragUtil.getDisplayBounds(targetPart.getControl());
- } else {
- // targetBounds = DragUtil.getDisplayBounds(getParent());
- targetDisplayBounds = DragUtil.getDisplayBounds(container);
- }
-
- if (side == SWT.CENTER || side == SWT.NONE) {
- return targetDisplayBounds;
- }
-
- int distance = Geometry.getDimension(targetDisplayBounds, !Geometry.isHorizontal(side));
-
- return Geometry.getExtrudedEdge(targetDisplayBounds, (int) (distance * getDockingRatio(sourcePart, targetPart)), side);
- }
-
- protected float getDockingRatio(AbstractPart dragged, AbstractPart target) {
- return 0.5f;
- }
-
- }
-
-
- /**
- * @return the lifeCycleEventProvider
- */
- protected SashContainerEventsProvider getLifeCycleEventProvider() {
- return lifeCycleEventProvider;
- }
-
- /**
- * @return the folderLifeCycleEventProvider
- */
- protected SashContainerFolderEventsProvider getFolderLifeCycleEventProvider() {
- return folderLifeCycleEventProvider;
- }
-
- /**
- * Get the event provider used to throw TabMouseEvents.
- *
- * @return the TabMouseEventsProvider
- */
- public TabMouseEventsProvider getFolderTabMouseEventProvider() {
- return tabMouseEventsProvider;
- }
-
- /**
- * Return a list of all folders opened in this SashContainer. The list should only
- * be used as a 'view' list. It should not be modified or written. The list
- * is observable. <br>
- * Actually, the folders are never removed from the list. This is because
- * TabFolderPart.dispose() is never called.
- * TODO Let TabFolderPart.dispose() be called.
- *
- * @return a read only and observable list of {@link IFolder}.
- */
- @Override
- public IObservableList<IFolder> getIFolderList() {
- return folderListManager.getFolderList();
- }
-
- /**
- * Init the folderListManager and let it listen to folder events.
- */
- private void initTabFolderListManager() {
- folderLifeCycleEventProvider = new SashContainerFolderEventsProvider();
- folderListManager = new TabFolderListManager();
- // Listen to folder events.
- folderLifeCycleEventProvider.addListener(folderListManager);
- }
-
- /**
- * Add a listener on pageChanged event.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param pageChangedListener
- *
- */
- @Override
- public void addPageChangedListener(IPageChangedListener pageChangedListener) {
- activePageTracker.addPageChangedListener(pageChangedListener);
- }
-
- /**
- * Remove a listener on pageChanged event.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param pageChangedListener
- *
- */
- @Override
- public void removePageChangedListener(IPageChangedListener pageChangedListener) {
- activePageTracker.removePageChangedListener(pageChangedListener);
- }
-
- /**
- * Add a listener on Page LifeCycle events.
- * This implementation delegates to the internal PageTracker.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- @Override
- public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener) {
- lifeCycleEventProvider.addListener(listener);
- }
-
-
- /**
- * Remove a listener on Page LifeCycle events.
- *
- * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
- * @param listener
- *
- */
- @Override
- public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener) {
- lifeCycleEventProvider.removeListener(listener);
- }
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- @Override
- public void addFolderTabMouseEventListener(ITabMouseEventsListener listener) {
- tabMouseEventsProvider.addListener(listener);
- }
-
- /**
- * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
- *
- * @param listener
- */
- @Override
- public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener) {
- tabMouseEventsProvider.removeListener(listener);
- }
-
- /* ***************************************************** */
- /* Internal Visitors */
- /* ***************************************************** */
-
-
- /**
- * Inner class.
- * A visitor setting the {@link MenuManager} on each folder.
- */
- private class SetFolderTabMenuVisitor extends PartVisitor {
-
-
- private MenuManager menuManager;
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public SetFolderTabMenuVisitor(MenuManager menuManager) {
- this.menuManager = menuManager;
- }
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
- part.setFolderTabMenuManager(menuManager);
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class CollectVisiblePageVisitor extends PartVisitor {
-
- private List<IPage> visiblePages = new ArrayList<IPage>();
-
- private Class<? extends IPage> expectedClass;
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public CollectVisiblePageVisitor() {
-
- }
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- @SuppressWarnings("unused")
- public CollectVisiblePageVisitor(Class<? extends IPage> expectedClass) {
- this.expectedClass = expectedClass;
- }
-
- /**
- * Get the result list.
- *
- * @param <T>
- * @return
- */
- @SuppressWarnings("unchecked")
- public <T> List<T> getVisiblePages() {
- return (List<T>) visiblePages;
- }
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
-
- IPage page = part.getVisiblePagePart();
- if (part != null) {
- if (expectedClass != null && expectedClass.isInstance(page)) {
- visiblePages.add(page);
- } else {
- visiblePages.add(page);
- }
-
- }
-
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class AbstractCollectIEditorPart extends PartVisitor {
-
- protected List<IEditorPart> editorParts = new ArrayList<IEditorPart>();
-
- /**
- * Constructor.
- *
- * @param menuManager
- */
- public AbstractCollectIEditorPart() {
-
- }
-
- /**
- * Get the result list.
- *
- * @param <T>
- * @return
- */
- public List<IEditorPart> getVisiblePages() {
- return editorParts;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all visible page in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- private class CollectVisibleIEditorPart extends AbstractCollectIEditorPart {
-
- /**
- * Set the menu if the visited node is a folder.
- */
- @Override
- public boolean accept(TabFolderPart part) {
-
- IPage page = part.getVisiblePagePart();
- if (page != null && page instanceof IEditorPage) {
- IEditorPage editorPage = (IEditorPage) page;
- editorParts.add(editorPage.getIEditorPart());
-
- }
- // continue searching
- return true;
- }
-
- }
-
- /**
- * Inner class.
- * A visitor used to collect all parts in the sashcontainer.
- * A visible page is a page whose the diagram area is visible.
- */
- @SuppressWarnings("unused")
- private class CollectIEditorParts extends AbstractCollectIEditorPart {
-
- /**
- * Add the part to thecollection.
- */
- @Override
- public boolean accept(EditorPart part) {
-
- IEditorPart editorPart = part.getIEditorPart();
- if (editorPart != null) {
- editorParts.add(editorPart);
- }
-
- // continue searching
- return true;
- }
-
- }
-
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2009, 2014 LIFL, CEA LIST, and others.
+ *
+ * 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:
+ * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 437217
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.core.sasheditor.internal;
+
+import static org.eclipse.papyrus.infra.core.sasheditor.Activator.log;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.util.Geometry;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IComponentModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IEditorModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageModel;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsContentProvider;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ITabFolderModel;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IEditorPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IFolder;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPage;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageLifeCycleEventsListener;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.IPageVisitor;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer;
+import org.eclipse.papyrus.infra.core.sasheditor.editor.ITabMouseEventsListener;
+import org.eclipse.papyrus.infra.core.sasheditor.utils.IObservableList;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.internal.DragCursors;
+import org.eclipse.ui.internal.dnd.DragUtil;
+import org.eclipse.ui.internal.dnd.IDragOverListener;
+import org.eclipse.ui.internal.dnd.IDropTarget;
+
+
+/**
+ * Main entry class of the SashWindows system.
+ * This class allows to have a multitab window with sashes.
+ * The class require a ContentProvider describing the content to be shown.
+ *
+ * @author dumoulin
+ */
+@SuppressWarnings("restriction")
+public class SashWindowsContainer implements ISashWindowsContainer {
+
+ /**
+ * The content provider describing the sashes, folders and tabs.
+ */
+ private ISashWindowsContentProvider contentProvider;
+
+ /**
+ * The manager used to get Main editor properties like Site, ActionBars, ...
+ */
+ private IMultiEditorManager multiEditorManager;
+
+ /**
+ * Tracker tracking the current active page. The tracker also disconnect last active page and connect
+ * the new one.
+ */
+ private ActivePageTracker activePageTracker;
+
+ /**
+ * Event provider firing Pages life cycle events to registered listeners. Inner parts call the fireXxxEvents
+ * when appropriate.
+ */
+ private SashContainerEventsProvider lifeCycleEventProvider;
+
+ /**
+ * Event provider firing Folder life cycle events to registered listeners. Inner parts call the fireXxxEvents
+ * when appropriate.
+ */
+ private SashContainerFolderEventsProvider folderLifeCycleEventProvider;
+
+ /**
+ * Event provider firing mouse events from tabs.
+ *
+ */
+ private TabMouseEventsProvider tabMouseEventsProvider;
+
+ /**
+ * A manager used to maintain a view list of available {@link TabFolderPart}. This list should
+ * only be used in a READ way. It should not be modified by something else than its manager.
+ *
+ */
+ private TabFolderListManager folderListManager;
+
+ /**
+ * The part used as root. We use an extra class as root in order to separate the code dedicated to
+ * ITilePart.
+ */
+ private RootPart rootPart;
+
+ /**
+ * The SWT container associated to this part. This is generally the container of the
+ * parent.
+ */
+ private Composite container;
+
+ /**
+ * The drop target.
+ */
+ protected DropTarget dropTarget;
+
+ /** A flag that indicates that the model is being synchronized. */
+ private AtomicBoolean isRefreshing = new AtomicBoolean(false);
+
+ /**
+ * The cached value of the menu manager, if any.
+ */
+ private MenuManager folderTabMenuManager;
+
+ /**
+ * Listener on widget diposed event.
+ */
+ private DisposeListener widgetDisposedListener = new DisposeListener() {
+
+ /**
+ * Called when the widget is disposed.
+ *
+ * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
+ *
+ * @param e
+ */
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ // We dispose the container.
+ dispose();
+ }
+ };
+
+ /**
+ * Constructor.
+ * Build a Container without IEditor management. Trying to add a EditorPart will result in an Exception.
+ * The ContentProvider should not contain IEditorModel.
+ */
+ public SashWindowsContainer() {
+ this(null);
+ }
+
+ /**
+ * Constructor.
+ * Build a container with EditorPart management. The container will allow to add EditorPart
+ * (and thus IEditorModel to the ContentProvider).
+ *
+ * @param multiEditorManager
+ * The manager allowing to use {@link IEditorModel} in the model.
+ * If null, the sash will not render IEditorModel.
+ *
+ */
+ public SashWindowsContainer(IMultiEditorManager multiEditorManager) {
+ this.multiEditorManager = multiEditorManager;
+ activePageTracker = new ActivePageTracker();
+
+ if (multiEditorManager != null) {
+ // Add listener on activePageChange.
+ // This listener will take in charge editor services switching.
+ activePageTracker.addActiveEditorChangedListener(new ActiveEditorServicesSwitcher(multiEditorManager.getEditorSite()));
+ }
+
+ // Life cycle event provider
+ lifeCycleEventProvider = new SashContainerEventsProvider();
+
+ // Tab mouve event provider
+ tabMouseEventsProvider = new TabMouseEventsProvider();
+
+ // Folder list view
+ initTabFolderListManager();
+ }
+
+ /**
+ * @return the contentProvider
+ */
+ protected ISashWindowsContentProvider getContentProvider() {
+ // Content provider should have been set.
+ assert (contentProvider != null);
+ // Double check for development
+ if (contentProvider == null) {
+ throw new IllegalStateException("ContentProvider should be set before calling any method requiring it.");
+ }
+
+ return contentProvider;
+ }
+
+ /**
+ * Set the content provider describing the sashes, folders and tabs.
+ *
+ * @param contentProvider
+ * the contentProvider to set
+ */
+ public void setContentProvider(ISashWindowsContentProvider contentProvider) {
+ // Use a delegate
+ // The delegate is used as a central point performing calls to the
+ // external implementation.
+ this.contentProvider = new DelegateContentProvider(contentProvider);
+ }
+
+ /**
+ * Creates control associated to this Container.
+ * This method should be called when the parent is build.
+ *
+ * @param parent
+ * The parent in which the editor should be created; must not be <code>null</code>.
+ */
+ public void createPartControl(Composite parent) {
+ this.container = parent;
+
+ rootPart = createRootPart();
+ // Create the tree of tile part.
+ rootPart.createPartControl(container);
+ // TODO 20130205
+ // Read lastActivePart from ContentProvider, and set it
+ // before refresh. Like this, sash will select the last save page
+
+ // Create children
+ refreshTabs();
+ // Set selection
+ // TODO 20130205 remove next, because refresh already do it
+ selectPage(lookupFirstValidPage());
+
+ // postCreatePartControl();
+ // TODO reactivate next
+ initDrag(container);
+ // activate();
+
+ // Listen for disposale
+ container.addDisposeListener(widgetDisposedListener);
+ }
+
+ /**
+ * Create the root part for the model.
+ */
+ private RootPart createRootPart() {
+ RootPart part = new RootPart(this);
+ return part;
+ }
+
+ /**
+ * Dispose the Container. All referenced resources will be disposed.
+ * The container should not be used anymore once disposed.
+ * The result of calling a method after a dispose() is unpredictable. <br>
+ * This method can be called several times. <br>
+ * <br>
+ * How the method works:
+ * <ul>
+ * <li>The {@link SashWindowsContainer} has two trees, the SWT tree and a Part tree ({@link #rootPart}).</li>
+ * <li>The SWT tree is disposed first.</li>
+ * <ul>
+ * <li>This prevent events fired from user interaction or from Widget modifiaction</li>
+ * <li>The SWT disposal stop before nested editors SWT (thanks to the DISPOSE event in {@link EditorPart}). At this point, the nested editor dispose() method is called.</li>
+ * <li>This allow to let the nested editor receive one single dispose call.</li>
+ * <li></li>
+ * </ul>
+ * <li>The Part tree is disposed second (by calling rootPart.disposeThisAndChildren() )</li>
+ * <ul>
+ * <li>properties are cleaned in order to help the GC</li>
+ * <li>swt controls are not disposed again</li>
+ * </ul>
+ * <li></li> <li></li> <li></li> <li></li> <li></li> </ul>
+ *
+ */
+ public void dispose() {
+ // Check if already disposed
+ if (isDisposed()) {
+ return;
+ }
+
+ // End disposing children's SWT controls.
+ // It is possible to recall the dispose() method on a Widget, even if we are called by the dispose event.
+ // Recalling the dispose method will continue disposing SWT children's.
+
+ // DO NOT dispose the container composite, as we did not create it!
+ if (container != null) {
+ for (Control next : container.getChildren()) {
+ next.dispose();
+ }
+ }
+
+ // dispose part children
+ if (rootPart != null) {
+ // rootPart can be null if createPartControl has not been called.
+ // This can happen in tests.
+ rootPart.disposeThisAndChildren();
+ }
+
+ // clean up properties to help GC
+ activePageTracker = null;
+ container = null;
+ contentProvider = null;
+ dragOverListener = null;
+ folderTabMenuManager = null;
+ lifeCycleEventProvider = null;
+ multiEditorManager = null;
+ rootPart = null;
+ }
+
+ /**
+ * Return true if the container is disposed, false otherwise.
+ *
+ * @return
+ */
+ @Override
+ public boolean isDisposed() {
+ // Use the activePageTracker as a flag.
+ return activePageTracker == null;
+ }
+
+ /**
+ * Notifies this page container that the specified page has been activated. This method
+ * is called after the current tabs has been changed, either by refreshing the tabs, or by a user
+ * UI action.
+ * This method just set correctly the active page value in the Container, and fire pageChanged events if needed.
+ * It does not change the selected page in the Part.
+ *
+ * Propagate the event to activePageTracker.
+ * Removed since 0.10
+ *
+ * @param childPart
+ */
+ // protected void pageChanged(PagePart childPart) {
+ // activePageTracker.setActiveEditor(childPart);
+ // lifeCycleEventProvider.firePageActivatedEvent(childPart);
+ // }
+
+ /**
+ * Notifies this page container that a pageChanged event has been fired by one swt Control.
+ * This method is usually called after the user selects a different tab.
+ *
+ * The method notify the ContentProvider, and calls {@link #pageChanged(PagePart)}.
+ * Removed since 0.10
+ *
+ * @param childPart
+ */
+ // protected void pageChangedEvent(PagePart childPart) {
+ //
+ // // Check if it is really a change before changing the model (which can throw change event)
+ // // The folder model change is done before the tracker fires the listeners, like this
+ // // listeners can check the model.
+ // if(getActivePage() == childPart)
+ // return;
+ //
+ // pageChanged(childPart);
+ // }
+
+ /**
+ * Set the active page. The current active page will be the specified page. Throw events indicating that
+ * the current ActivePage has changed. <br>
+ * Do not set the activeSelection.
+ *
+ *
+ * @param childPart
+ */
+ protected void setActivePage(PagePart childPart) {
+
+ // Do nothing if the activePage has not changed
+ if (childPart == null || getActivePage() == childPart) {
+ return;
+ }
+
+ // TODO 20130205 remove next
+ contentProvider.setCurrentFolder(childPart.getParent().getRawModel());
+
+ activePageTracker.setActiveEditor(childPart);
+ lifeCycleEventProvider.firePageActivatedEvent(childPart);
+ }
+
+ /**
+ * This method allow to change current activePage. It set the activePage, and select it in
+ * the folder. <br>
+ * This method fires notifications (activePageChanged).
+ *
+ * @param newActivePage
+ * The page that should become the active one.
+ */
+ protected void setActivePageAndSelection(PagePart newActivePage) {
+
+ PagePart oldSelection = getActivePage();
+ // First, set the selection, like this the observers will see the correct selection.
+ synchronizeActiveSelection(newActivePage);
+ try {
+ // Set the active page
+ setActivePage(newActivePage);
+
+ } catch (RuntimeException e) {
+ // Restore selection in case of exception
+ synchronizeActiveSelection(oldSelection);
+ // lets propagate
+ throw e;
+ }
+ }
+
+ /**
+ * Synchronize the active selection to be the page of the activePage.
+ * This should be called when the activePage is set, but the selection is not
+ * yet set. <br>
+ * This should not throw events (neither selctionChanged or pageChanged event).
+ *
+ */
+ protected void synchronizeActiveSelection() {
+ PagePart activePage = getActivePage();
+
+ synchronizeActiveSelection(activePage);
+ }
+
+ /**
+ * Synchronize the active selection to be the specified page. Do not synchronize with the activePage. <br>
+ * This should not throw events (neither selctionChanged or pageChanged event).
+ *
+ * @param page
+ */
+ private void synchronizeActiveSelection(PagePart page) {
+ if (page == null) {
+ return;
+ }
+ TabFolderPart folder = page.getParent();
+
+ // Folder can be null in case of tests
+ if (folder != null) {
+ folder.setSelection(page);
+ }
+
+ }
+
+ /**
+ * A change has happen in one of the inner parts. Relay the event.
+ * This method is called by inner parts whenever the event happen in one of the part.
+ * It collects and relay the firePropertyChange(int propertyId) calls from the inner IEditor.
+ *
+ * @param propertyId
+ */
+ protected void firePropertyChange(int propertyId) {
+ // For now, we do nothing with this event.
+ }
+
+ /**
+ * Create the part for the specified newModel.
+ *
+ * @param parent
+ * The parent of the created part.
+ * @param partModel
+ * The model for which a part should be created.
+ * @return
+ */
+ protected PagePart createPagePart(TabFolderPart parent, IPageModel partModel, Object rawModel) {
+
+
+ if (partModel instanceof IEditorModel) {
+ // Check if we can use IEditorModel
+ if (multiEditorManager == null) {
+ throw new IllegalArgumentException("Container can't accept IEditorModel as no IMultiEditorManager is set. Please set a IMultiEditorManager.");
+ }
+
+ return new EditorPart(parent, (IEditorModel) partModel, rawModel, multiEditorManager);
+ } else if (partModel instanceof IComponentModel) {
+ return new ComponentPart(parent, (IComponentModel) partModel, rawModel);
+ } else {
+ // Return a default part
+ }
+
+ // TODO return a default part showing an error instead.
+ throw new IllegalArgumentException("No Part found for the model '" + rawModel + "'");
+ }
+
+ /**
+ * Get the {@link ITabFolderModel} of the currently selected folder.
+ *
+ * @return
+ */
+ @Override
+ public ITabFolderModel getSelectedTabFolderModel() {
+
+ // Get the activePage. The seleted folder is its parent.
+ PagePart activePage = activePageTracker.getActiveEditor();
+ if (activePage != null && activePage.getParent() != null) {
+ return activePage.getParent().getPartModel();
+ }
+ // No active page exist, but their should be a folder
+ TabFolderPart folder = lookupFirstValidFolder();
+ return folder.getPartModel();
+ }
+
+ /**
+ * Lookup the first valid folder in this sash system.
+ * There is always a valid folder.
+ *
+ * @return The first valid folder.
+ */
+ private TabFolderPart lookupFirstValidFolder() {
+
+ LookupFirstFolderVisitor visitor = new LookupFirstFolderVisitor();
+ rootPart.visit(visitor);
+ return visitor.result();
+ }
+
+ /**
+ * Get the active page.
+ *
+ * @return
+ */
+ private PagePart getActivePage() {
+ return activePageTracker.getActiveEditor();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getActiveEditor()
+ * @return
+ *
+ */
+ @Override
+ public IEditorPart getActiveEditor() {
+ PagePart pagePart = getActivePage();
+ if (pagePart instanceof EditorPart) {
+ return ((EditorPart) pagePart).getIEditorPart();
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Get the active page public API.
+ *
+ * @return
+ */
+ @Override
+ public IPage getActiveSashWindowsPage() {
+ return getActivePage();
+ }
+
+ /**
+ * Get the list of visible IPages. The visible IPages are the one that have there diagram area
+ * visible.
+ *
+ * @return
+ */
+ @Override
+ public List<IPage> getVisiblePages() {
+ CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor();
+
+ rootPart.visit(visitor);
+
+ return visitor.getVisiblePages();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getNextPage()
+ *
+ * @return
+ */
+ @Override
+ public IPage getNextPage() {
+ CollectNextPageVisitor visitor = new CollectNextPageVisitor(false);
+ return getPage(visitor);
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#getNextPage()
+ *
+ * @return
+ */
+ @Override
+ public IPage getPreviousPage() {
+ CollectNextPageVisitor visitor = new CollectNextPageVisitor(true);
+ return getPage(visitor);
+ }
+
+ /**
+ * Use the provided visitor to get the next page and return it.
+ */
+ private IPage getPage(CollectNextPageVisitor visitor) {
+ if (visitor != null) {
+ rootPart.visit(visitor);
+ if (!visitor.getNextPages().isEmpty()) {
+ return (IPage) visitor.getNextPages().get(0);
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get the list of visible IPages. The visible IPages are the one that have there diagram area
+ * visible.
+ *
+ * @return
+ */
+ // public List<IEditorPage> getVisibleIEditorPages() {
+ // CollectVisiblePageVisitor visitor = new CollectVisiblePageVisitor( IEditorPage.class);
+ //
+ // rootPart.visit(visitor);
+ //
+ // return visitor.getVisiblePages();
+ // }
+
+ /**
+ * Get the list of visible IPages. The visible IPages are the one that have there diagram area
+ * visible.
+ *
+ * @return
+ */
+ @Override
+ public List<IEditorPart> getVisibleIEditorParts() {
+ CollectVisibleIEditorPart visitor = new CollectVisibleIEditorPart();
+ rootPart.visit(visitor);
+
+ return visitor.getVisiblePages();
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#setFocus()
+ *
+ */
+ @Override
+ public void setFocus() {
+ setFocus(getActivePage());
+ }
+
+ /**
+ * Sets focus to the control for the given page. If the page has an editor,
+ * this calls its <code>setFocus()</code> method. Otherwise, this calls <code>setFocus</code> on the control for the page.
+ *
+ * @param pageIndex
+ * the index of the page
+ */
+ private void setFocus(PagePart part) {
+ if (part != null) {
+ part.setFocus();
+ }
+ }
+
+
+ /**
+ * Refresh the tabs.
+ * Is we are already currently refreshing, simply return.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
+ *
+ */
+ @Override
+ public void refreshTabs() {
+
+ // Check if we arent already refreshing
+ if (isRefreshing.compareAndSet(false, true)) {
+ try {
+ refreshTabsInternal();
+ } finally {
+ isRefreshing.set(false);
+ }
+ } else {
+ log.warn("refresh inside refresh !");
+ }
+
+ }
+
+ /**
+ * Refresh the tab of the page, (i.e the name and icon in the page's tab).
+ *
+ * @param page
+ * The page for which the name and icon should be refreshed.
+ */
+ public void refreshPageTab(IPage page) {
+ if (page instanceof PagePart) {
+ ((PagePart) page).refreshTab();
+ } else {
+ // TODO : lookup for the corresponding PagePart, and call refresh.
+
+ }
+ }
+
+ /**
+ * Real implementation of refreshTab.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#refreshTabs()
+ *
+ */
+ private void refreshTabsInternal() {
+ // System.out.println("start synchronize2() ------------------------");
+ // showTilesStatus();
+
+ // Get the currently selected folder
+ PagePart oldActivePage = getActivePage();
+
+ // Do refresh
+ container.setRedraw(false);
+ // Create map of parts
+ // PartMap<T> partMap = new PartMap<T>();
+ PartLists garbageMaps = new PartLists();
+ rootPart.fillPartMap(garbageMaps);
+
+ // Synchronize parts
+ rootPart.synchronize2(garbageMaps);
+
+
+ // Remove orphaned parts (no more used)
+ garbageMaps.garbage();
+
+ // set active page if needed
+ setActivePageAndSelection(checkAndGetActivePage(oldActivePage, garbageMaps));
+
+ // Reenable SWT and force layout
+ container.setRedraw(true);
+ container.layout(true, true);
+ // System.out.println("end synchronize2() ------------------------");
+ // showTilesStatus();
+ }
+
+ /**
+ * Select the specified page in the Parts. The specified page will becomes the active one.
+ * Appropriate events are fired.
+ * This is the programatic counterpart of selecting a page in the UI.
+ * If the provided page is null, do nothing.
+ * Removed since 0.10
+ *
+ * @param page
+ * The page to select or null.
+ */
+ // protected void selectPage(PagePart page) {
+ // if(page == null)
+ // return;
+ // TabFolderPart folder = page.getParent();
+ // folder.setActiveEditor(page);
+ // }
+
+ /**
+ * Select the specified page in the Parts. The specified page will becomes the active one.
+ * Appropriate events are fired if needed.
+ * This is the programmatic counterpart of selecting a page in the UI.
+ * If the provided page is null, do nothing.
+ *
+ * @param page
+ * The page to select or null. The IPage should
+ * be an instance previously returned by the SashContainer.
+ *
+ */
+ @Override
+ public void selectPage(IPage page) {
+ if (page == null) {
+ return;
+ }
+
+ // check if we are a correct instance.
+ if (!(page instanceof PagePart)) {
+ return;
+ }
+
+ setActivePageAndSelection((PagePart) page);
+ }
+
+ /**
+ * Lookup the {@link IPage} used to render the specified rawModel.
+ *
+ * @param rawModel
+ * The model for which the IPage is requested.
+ * If the model is not rendered, return null;
+ *
+ * @return The corresponding IPage or null if not found.
+ */
+ @Override
+ public IPage lookupModelPage(Object rawModel) {
+ // Use a visitor to lookup the first IPage
+ LookupModelPageVisitor visitor = new LookupModelPageVisitor(rawModel);
+ rootPart.visit(visitor);
+ return visitor.result();
+ }
+
+ /**
+ * Lookup the {@link IPage} used to render the specified IEditorPart.
+ *
+ * @param editor
+ * The IEditorPart for which the IPage is requested.
+ * If the IEditorPart is not rendered, return null;
+ *
+ * @return The corresponding IPage or null if not found.
+ */
+ @Override
+ public IPage lookupIPageByIEditorPart(IEditorPart editor) {
+ // Use a visitor to lookup the first IPage
+ LookupIPageByIEditorPartVisitor visitor = new LookupIPageByIEditorPartVisitor(editor);
+ rootPart.visit(visitor);
+ return visitor.result();
+ }
+
+ /**
+ * Check if the oldActivePage still alive, and set it if needed.
+ * If the oldActivePage is null, set an active page if one exist.
+ * If the oldActivePage still alive, let it as the active one. If it is
+ * disposed, get arbitrarily an active page if one exist.
+ *
+ * @param oldActivePage
+ * @param partLists
+ * @param garbageMaps
+ * @return A valid active page or null if none exists.
+ */
+ private PagePart checkAndGetActivePage(PagePart oldActivePage, PartLists partLists) {
+
+ // Check if there is a created page
+ PagePart activePage = partLists.getFirstCreatedPage();
+ if (activePage != null) {
+ // There is a created page. Set it as the selected and active one
+ return activePage;
+ }
+
+ // Check oldActivePage validity (in case it has been deleted)
+ if (oldActivePage != null && !(oldActivePage.isOrphaned() || oldActivePage.isUnchecked())) {
+ return oldActivePage;
+ }
+
+ // Get an active page if any
+ return lookupFirstValidPage();
+ }
+
+ /**
+ * Lookup for a valid active Page. Return null if none is found.
+ * TODO Use a visitor to implements this method.
+ *
+ * @return
+ */
+ private PagePart lookupFirstValidPage() {
+ // First get a list of active editors
+ PartLists garbageMaps = new PartLists();
+ rootPart.fillPartMap(garbageMaps);
+ return garbageMaps.getFirstValidPage();
+ }
+
+ /**
+ * Set a {@link MenuManager} used to manage a contextual menu that is shown on the tabs area of the folders.
+ *
+ * @param menuManager
+ * The {@link MenuManager} used to create the menu on the tab area.
+ */
+ @Override
+ public void setFolderTabMenuManager(MenuManager menuManager) {
+ this.folderTabMenuManager = menuManager;
+ // Set the MenuManager in each existing folder.
+ // Use a visitor.
+ SetFolderTabMenuVisitor visitor = new SetFolderTabMenuVisitor(menuManager);
+ rootPart.visit(visitor);
+ }
+
+ /**
+ * @return the menuManager
+ */
+ protected MenuManager getFolderTabMenuManager() {
+ return folderTabMenuManager;
+ }
+
+ /**
+ * Show the status of the different Tiles composing the sash system.
+ * Used for debug purpose.
+ */
+ public void showTilesStatus() {
+ ShowPartStatusVisitor visitor = new ShowPartStatusVisitor();
+ rootPart.visit(visitor);
+ }
+
+
+ /**
+ * Visit all the Pages (IEditorPage and IComponentPage), allowing to access to the public interface.
+ */
+ @Override
+ public void visit(IPageVisitor pageVisitor) {
+ PageVisitorWrapper visitor = new PageVisitorWrapper(pageVisitor);
+ rootPart.visit(visitor);
+ }
+
+ /**
+ * Visit the Part associated to the container. This method visibility is protected in order to be able to access it
+ * from junit tests.
+ * It is not intended to be used by public API or from outside.
+ */
+ protected void visit(IPartVisitor visitor) {
+ rootPart.visit(visitor);
+ }
+
+ /* ***************************************************** */
+ /* Drag and Drop methods */
+ /* ***************************************************** */
+
+ /**
+ *
+ */
+ private void initDrag(Composite container) {
+ DragUtil.addDragTarget(container, dragOverListener);
+
+ }
+
+ IDragOverListener dragOverListener = new IDragOverListener() {
+
+ /**
+ *
+ * @see org.eclipse.ui.internal.dnd.IDragOverListener#drag(org.eclipse.swt.widgets.Control, java.lang.Object, org.eclipse.swt.graphics.Point, org.eclipse.swt.graphics.Rectangle)
+ */
+ @Override
+ public IDropTarget drag(Control currentControl, Object draggedObject, Point position, Rectangle dragRectangle) {
+ // TODO remove the cast by changing the method. Only folder can be source and target
+ final TabFolderPart sourcePart = (TabFolderPart) rootPart.findPart(draggedObject); // (ITilePart) draggedObject;
+ // Compute src tab index
+ // TODO move that and previous in the sender of drag event. Use a class containing both as draggedObject.
+ final int srcTabIndex = PTabFolder.getDraggedObjectTabIndex(draggedObject);
+
+ // System.out.println("drag to position=" + position);
+ Rectangle containerDisplayBounds = DragUtil.getDisplayBounds(container);
+ AbstractPanelPart targetPart = null;
+
+ // Check if the cursor is inside the container
+ if (containerDisplayBounds.contains(position)) {
+
+ if (rootPart != null) {
+ targetPart = (AbstractPanelPart) rootPart.findPart(position);
+ // System.out.println("targetPart=" + targetPart
+ // + ", position=" + position
+ // + "container.toControl(position)=" + container.toControl(position));
+ }
+
+ if (targetPart != null) {
+ final Control targetControl = targetPart.getControl();
+
+ final Rectangle targetBounds = DragUtil.getDisplayBounds(targetControl);
+
+ int side = Geometry.getClosestSide(targetBounds, position);
+ int distance = Geometry.getDistanceFromEdge(targetBounds, position, side);
+
+ // Reserve the 5 pixels around the edge of the part for the drop-on-edge cursor
+ // Check if the target can handle the drop.
+ if (distance >= 5) {
+ // Otherwise, ask the part if it has any special meaning for this drop location
+ // TODO remove cast; change return type of findPart()
+ IDropTarget target = targetPart.getDropTarget(draggedObject, sourcePart, position);
+ if (target != null) {
+ return target;
+ }
+ } else {
+ // We are on the boarder, try to drop on the parent
+ // Warning : the parent could be the rootPart
+ // System.out.println("DropTarget near the border");
+ }
+ //
+ if (distance > 30) {
+ side = SWT.CENTER;
+ }
+ //
+ // // If the part doesn't want to override this drop location then drop on the edge
+ //
+ // // A "pointless drop" would be one that will put the dragged object back where it started.
+ // // Note that it should be perfectly valid to drag an object back to where it came from -- however,
+ // // the drop should be ignored.
+ //
+ @SuppressWarnings("unused")
+ boolean pointlessDrop = false;
+
+ if (sourcePart == targetPart) {
+ pointlessDrop = true;
+ }
+
+ return createDropTarget(sourcePart, srcTabIndex, side, side, targetPart);
+ }
+ } else {
+ // Cursor is outside the container
+ // System.out.println("Outside container bounds");
+ // This will be used to create a new Window.
+ // We only allow dropping into a stack, not creating one
+ // if (differentWindows)
+ // return null;
+
+ int side = Geometry.getClosestSide(containerDisplayBounds, position);
+
+ boolean pointlessDrop = false;
+ int cursor = Geometry.getOppositeSide(side);
+
+ if (pointlessDrop) {
+ side = SWT.NONE;
+ }
+
+ return createDropTarget(sourcePart, srcTabIndex, side, cursor, null);
+ }
+ return null;
+ }
+
+ };
+
+
+ /**
+ * Create the drop target
+ */
+ private DropTarget createDropTarget(final TabFolderPart sourcePart, int srcTabIndex, int side, int cursor, AbstractPart targetPart) {
+ if (dropTarget == null) {
+ dropTarget = new DropTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
+ } else {
+ dropTarget.setTarget(sourcePart, srcTabIndex, side, cursor, targetPart);
+ }
+ return dropTarget;
+ }
+
+ /**
+ * Class implementing methods required by drop targets.
+ */
+ protected class DropTarget implements IDropTarget {
+
+ int count = 0;
+
+ int cursor = SWT.TOP;
+
+ private int side;
+
+ private AbstractPanelPart targetPart;
+
+ private int srcTabIndex;
+
+ private TabFolderPart sourcePart;
+
+ /**
+ * Constructor.
+ */
+ public DropTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
+ this.cursor = cursor;
+ this.side = side;
+ this.sourcePart = sourcePart;
+ this.srcTabIndex = srcTabIndex;
+ this.targetPart = (AbstractPanelPart) targetPart;
+ }
+
+ public void setTarget(TabFolderPart sourcePart, int srcTabIndex, int cursor, int side, AbstractPart targetPart) {
+ this.cursor = cursor;
+ this.side = side;
+ this.sourcePart = sourcePart;
+ this.srcTabIndex = srcTabIndex;
+ this.targetPart = (AbstractPanelPart) targetPart;
+ }
+
+ /**
+ * A folder is dropped.
+ *
+ * @see org.eclipse.ui.internal.dnd.IDropTarget#drop()
+ */
+ @Override
+ public void drop() {
+ // @TODO remove next cast
+ if (side == SWT.CENTER) { // Add to target folder
+ contentProvider.movePage(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), -1);
+ } else { // Create a new folder
+ contentProvider.createFolder(sourcePart.getPartModel(), srcTabIndex, ((TabFolderPart) targetPart).getPartModel(), side);
+ }
+ }
+
+ /**
+ * Return the cursor used during drag.
+ *
+ * @see org.eclipse.ui.internal.dnd.IDropTarget#getCursor()
+ */
+ @Override
+ public Cursor getCursor() {
+ // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getCursor()-" + count++);
+ return DragCursors.getCursor(DragCursors.positionToDragCursor(cursor));
+
+ }
+
+ @Override
+ public Rectangle getSnapRectangle() {
+ // System.out.println(SashWindowsContainer.this.getClass().getSimpleName() + ".getSnapRectangle(" + "sourcePart=" + sourcePart + ", targetPart=" + targetPart + ", side=" + side);
+ Rectangle targetDisplayBounds;
+
+ if (targetPart != null) {
+ targetDisplayBounds = DragUtil.getDisplayBounds(targetPart.getControl());
+ } else {
+ // targetBounds = DragUtil.getDisplayBounds(getParent());
+ targetDisplayBounds = DragUtil.getDisplayBounds(container);
+ }
+
+ if (side == SWT.CENTER || side == SWT.NONE) {
+ return targetDisplayBounds;
+ }
+
+ int distance = Geometry.getDimension(targetDisplayBounds, !Geometry.isHorizontal(side));
+
+ return Geometry.getExtrudedEdge(targetDisplayBounds, (int) (distance * getDockingRatio(sourcePart, targetPart)), side);
+ }
+
+ protected float getDockingRatio(AbstractPart dragged, AbstractPart target) {
+ return 0.5f;
+ }
+
+ }
+
+
+ /**
+ * @return the lifeCycleEventProvider
+ */
+ protected SashContainerEventsProvider getLifeCycleEventProvider() {
+ return lifeCycleEventProvider;
+ }
+
+ /**
+ * @return the folderLifeCycleEventProvider
+ */
+ protected SashContainerFolderEventsProvider getFolderLifeCycleEventProvider() {
+ return folderLifeCycleEventProvider;
+ }
+
+ /**
+ * Get the event provider used to throw TabMouseEvents.
+ *
+ * @return the TabMouseEventsProvider
+ */
+ public TabMouseEventsProvider getFolderTabMouseEventProvider() {
+ return tabMouseEventsProvider;
+ }
+
+ /**
+ * Return a list of all folders opened in this SashContainer. The list should only
+ * be used as a 'view' list. It should not be modified or written. The list
+ * is observable. <br>
+ * Actually, the folders are never removed from the list. This is because
+ * TabFolderPart.dispose() is never called.
+ * TODO Let TabFolderPart.dispose() be called.
+ *
+ * @return a read only and observable list of {@link IFolder}.
+ */
+ @Override
+ public IObservableList<IFolder> getIFolderList() {
+ return folderListManager.getFolderList();
+ }
+
+ /**
+ * Init the folderListManager and let it listen to folder events.
+ */
+ private void initTabFolderListManager() {
+ folderLifeCycleEventProvider = new SashContainerFolderEventsProvider();
+ folderListManager = new TabFolderListManager();
+ // Listen to folder events.
+ folderLifeCycleEventProvider.addListener(folderListManager);
+ }
+
+ /**
+ * Add a listener on pageChanged event.
+ * This implementation delegates to the internal PageTracker.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param pageChangedListener
+ *
+ */
+ @Override
+ public void addPageChangedListener(IPageChangedListener pageChangedListener) {
+ activePageTracker.addPageChangedListener(pageChangedListener);
+ }
+
+ /**
+ * Remove a listener on pageChanged event.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param pageChangedListener
+ *
+ */
+ @Override
+ public void removePageChangedListener(IPageChangedListener pageChangedListener) {
+ activePageTracker.removePageChangedListener(pageChangedListener);
+ }
+
+ /**
+ * Add a listener on Page LifeCycle events.
+ * This implementation delegates to the internal PageTracker.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#addPageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param listener
+ *
+ */
+ @Override
+ public void addPageLifeCycleListener(IPageLifeCycleEventsListener listener) {
+ lifeCycleEventProvider.addListener(listener);
+ }
+
+
+ /**
+ * Remove a listener on Page LifeCycle events.
+ *
+ * @see org.eclipse.papyrus.infra.core.sasheditor.editor.ISashWindowsContainer#removePageChangedListener(org.eclipse.papyrus.infra.core.sasheditor.editor.IPageChangedListener)
+ * @param listener
+ *
+ */
+ @Override
+ public void removePageLifeCycleListener(IPageLifeCycleEventsListener listener) {
+ lifeCycleEventProvider.removeListener(listener);
+ }
+
+ /**
+ * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
+ *
+ * @param listener
+ */
+ @Override
+ public void addFolderTabMouseEventListener(ITabMouseEventsListener listener) {
+ tabMouseEventsProvider.addListener(listener);
+ }
+
+ /**
+ * Add a listener {@link ITabMouseEventsListener} on folder's tabs events.
+ *
+ * @param listener
+ */
+ @Override
+ public void removeFolderTabMouseEventListener(ITabMouseEventsListener listener) {
+ tabMouseEventsProvider.removeListener(listener);
+ }
+
+ /* ***************************************************** */
+ /* Internal Visitors */
+ /* ***************************************************** */
+
+
+ /**
+ * Inner class.
+ * A visitor setting the {@link MenuManager} on each folder.
+ */
+ private class SetFolderTabMenuVisitor extends PartVisitor {
+
+
+ private MenuManager menuManager;
+
+ /**
+ * Constructor.
+ *
+ * @param menuManager
+ */
+ public SetFolderTabMenuVisitor(MenuManager menuManager) {
+ this.menuManager = menuManager;
+ }
+
+ /**
+ * Set the menu if the visited node is a folder.
+ */
+ @Override
+ public boolean accept(TabFolderPart part) {
+ part.setFolderTabMenuManager(menuManager);
+ return true;
+ }
+
+ }
+
+ /**
+ * Inner class.
+ * A visitor used to collect all visible page in the sashcontainer.
+ * A visible page is a page whose the diagram area is visible.
+ */
+ private class CollectVisiblePageVisitor extends PartVisitor {
+
+ private List<IPage> visiblePages = new ArrayList<IPage>();
+
+ private Class<? extends IPage> expectedClass;
+
+ /**
+ * Constructor.
+ *
+ * @param menuManager
+ */
+ public CollectVisiblePageVisitor() {
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param menuManager
+ */
+ @SuppressWarnings("unused")
+ public CollectVisiblePageVisitor(Class<? extends IPage> expectedClass) {
+ this.expectedClass = expectedClass;
+ }
+
+ /**
+ * Get the result list.
+ *
+ * @param <T>
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public <T> List<T> getVisiblePages() {
+ return (List<T>) visiblePages;
+ }
+
+ /**
+ * Set the menu if the visited node is a folder.
+ */
+ @Override
+ public boolean accept(TabFolderPart part) {
+
+ IPage page = part.getVisiblePagePart();
+ if (part != null) {
+ if (expectedClass != null && expectedClass.isInstance(page)) {
+ visiblePages.add(page);
+ } else {
+ visiblePages.add(page);
+ }
+
+ }
+
+ return true;
+ }
+
+ }
+
+ /**
+ * Inner class.
+ * A visitor used to collect the next page of the next opened tab (right or left).
+ * A tab is opened if it is visible in the editor.
+ */
+ private class CollectNextPageVisitor extends PartVisitor {
+
+ private List<IPage> nextPages = new ArrayList<IPage>();
+
+ private final boolean isPrevious;
+
+ /**
+ * Constructor
+ */
+ public CollectNextPageVisitor(boolean isPrevious) {
+ this.isPrevious = isPrevious;
+ }
+
+ /**
+ * Get the results list.
+ */
+ public List<IPage> getNextPages() {
+ return nextPages;
+ }
+
+ /**
+ * Get the index of the currently active tab and then increments/decrements the index by 1
+ * to select the next/previous tab. The page of the tab is returned.
+ */
+ @Override
+ public boolean accept(TabFolderPart part) {
+ PagePart activePage = activePageTracker.getActiveEditor();
+ PagePart visiblePage = part.getVisiblePagePart();
+
+ if (activePage == visiblePage) {
+ CTabFolder tabFolder = part.getTabFolder();
+ int itemCount = tabFolder.getItemCount();
+
+ if (itemCount > 1) {
+ int selectionIndex = tabFolder.getSelectionIndex();
+
+ if (isPrevious) {
+ selectionIndex--;
+ if (selectionIndex < 0) {
+ selectionIndex = itemCount - 1;
+ }
+ } else {
+ selectionIndex++;
+ if (selectionIndex >= itemCount) {
+ selectionIndex = 0;
+ }
+ }
+
+ IPage nextPage = part.getPagePart(selectionIndex);
+ if (nextPage != null) {
+ nextPages.add(nextPage);
+ }
+ }
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Inner class.
+ * A visitor used to collect all visible page in the sashcontainer.
+ * A visible page is a page whose the diagram area is visible.
+ */
+ private class AbstractCollectIEditorPart extends PartVisitor {
+
+ protected List<IEditorPart> editorParts = new ArrayList<IEditorPart>();
+
+ /**
+ * Constructor.
+ *
+ * @param menuManager
+ */
+ public AbstractCollectIEditorPart() {
+
+ }
+
+ /**
+ * Get the result list.
+ *
+ * @param <T>
+ * @return
+ */
+ public List<IEditorPart> getVisiblePages() {
+ return editorParts;
+ }
+
+ }
+
+ /**
+ * Inner class.
+ * A visitor used to collect all visible page in the sashcontainer.
+ * A visible page is a page whose the diagram area is visible.
+ */
+ private class CollectVisibleIEditorPart extends AbstractCollectIEditorPart {
+
+ /**
+ * Set the menu if the visited node is a folder.
+ */
+ @Override
+ public boolean accept(TabFolderPart part) {
+
+ IPage page = part.getVisiblePagePart();
+ if (page != null && page instanceof IEditorPage) {
+ IEditorPage editorPage = (IEditorPage) page;
+ editorParts.add(editorPage.getIEditorPart());
+
+ }
+ // continue searching
+ return true;
+ }
+
+ }
+
+ /**
+ * Inner class.
+ * A visitor used to collect all parts in the sashcontainer.
+ * A visible page is a page whose the diagram area is visible.
+ */
+ @SuppressWarnings("unused")
+ private class CollectIEditorParts extends AbstractCollectIEditorPart {
+
+ /**
+ * Add the part to thecollection.
+ */
+ @Override
+ public boolean accept(EditorPart part) {
+
+ IEditorPart editorPart = part.getIEditorPart();
+ if (editorPart != null) {
+ editorParts.add(editorPart);
+ }
+
+ // continue searching
+ return true;
+ }
+
+ }
+
+
+
+}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
index 337d24be4b3..bc7175f0d1e 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd/src/org/eclipse/papyrus/infra/gmfdiag/dnd/strategy/ExpansionElementDropStrategy.java
@@ -1,191 +1,191 @@
-/*****************************************************************************
- * Copyright (c) 2015 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.infra.gmfdiag.dnd.strategy;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.commands.CompoundCommand;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
-import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
-import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
-import org.eclipse.gmf.runtime.emf.type.core.IElementType;
-import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
-import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
-import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansion.ChildrenListRepresentation;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansion.DiagramExpansionSingleton;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansion.DiagramExpansionsRegistry;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.AbstractRepresentation;
-import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.Representation;
-import org.eclipse.papyrus.infra.gmfdiag.dnd.Activator;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * This strategy has been added in order allow dropping new element done by using expansion model
- * See Requirement #org.eclipse.papyrus.infra.gmfdiag.expansion.Req_020
- *
- */
-public class ExpansionElementDropStrategy extends TransactionalDropStrategy {
-
- private DiagramExpansionsRegistry diagramExpansionRegistry;
- private static final String DEBUG_PREFIX = "[EXPANSION_DIAGRAM]";
- private static final boolean DEBUG_EXPANSION = "true".equalsIgnoreCase(Platform.getDebugOption(
- "org.eclipse.papyrus.infra.gmfdiag.common/debug/expansion"));
-
- /**
- * Constructor.
- *
- */
- public ExpansionElementDropStrategy() {
- this.diagramExpansionRegistry = DiagramExpansionSingleton.getInstance().getDiagramExpansionRegistry();
- }
- public String getLabel() {
- return "Expansion element drag and drop";
- }
-
- public String getID() {
- return "org.eclipse.papyrus.infra.gmfdiag.dnd.expansiondropsteategy";
- }
-
- public String getDescription() {
- return "This strategy is used to allow dropping of expansion of elements in extended diagrams.";
- }
-
- public Image getImage() {
- return null;
- }
-
- public int getPriority() {
- return 0;
- }
-
- public void setOptions(Map<String, Object> options) {
- // Nothing
- }
- /**
- * get the diagram type from a view.
- * @param currentView the current view
- * @return the diagram type it can be also a view point
- */
- protected String getDiagramType(View currentView) {
- Diagram diagram=currentView.getDiagram();
- String currentDiagramType=null;
- ViewPrototype viewPrototype=org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils.getPrototype(diagram);
- if(viewPrototype!=null){
- currentDiagramType=viewPrototype.getLabel();
- }
- else{
- currentDiagramType=diagram.getType();
- }
- return currentDiagramType;
- }
- @Override
- public Command doGetCommand(Request request, final EditPart targetEditPart) {
-
- CompositeCommand cc = new CompositeCommand(getLabel());
- if(targetEditPart instanceof GraphicalEditPart){
- IGraphicalEditPart graphicalEditPart= (IGraphicalEditPart)targetEditPart;
- String diagramType= getDiagramType(graphicalEditPart.getNotationView());
- ChildrenListRepresentation listRepresentation=diagramExpansionRegistry.mapChildreen.get(diagramType);
- //to the current diagram, a expansion is added.
- if(listRepresentation==null){
- return null;
- }
- //look for all possible children for the current target.
- List<String>childrenList =listRepresentation.parentChildrenRelation.get(graphicalEditPart.getNotationView().getType());
- if(childrenList==null){
- return null;
- }
- List<EObject> sourceElements = getSourceEObjects(request);
- if(sourceElements.size()==0 ){
- return null;
- }
- final List<EObject> valuesToAdd = new ArrayList<EObject>(sourceElements.size());
- //getList of accepted ElementType
- final ArrayList<ISpecializationType> acceptedElementTypes= new ArrayList<ISpecializationType>();
-
-
- for (String posibleID : childrenList) {
- AbstractRepresentation abstractRepresentation=listRepresentation.IDMap.get(posibleID);
- if( abstractRepresentation instanceof Representation){
- String elementTypeID=((Representation)abstractRepresentation).getGraphicalElementType();
- if( elementTypeID!=null && elementTypeID!=""){
- final IElementType elementType=ElementTypeRegistry.getInstance().getType(elementTypeID);
- if( elementType instanceof ISpecializationType){
- acceptedElementTypes.add((ISpecializationType)elementType);
- }
- }
- }
- }
- if(DEBUG_EXPANSION){
- Activator.log.debug(DEBUG_PREFIX+"try to drop "+ sourceElements+" inside "+graphicalEditPart.getNotationView().getType()+ " accepts "+childrenList);
- }
- // get the sub list of accepted source element that match to elementType
- for (EObject sourceElement : sourceElements) {
- Command cmd=null;
- int acceptedElementTypesIndex=0;
- while (cmd==null &&acceptedElementTypesIndex<acceptedElementTypes.size()){
- final ISpecializationType iSpecializationType = acceptedElementTypes.get(acceptedElementTypesIndex);
- IElementMatcher matcher=iSpecializationType.getMatcher();
- if( matcher.matches(sourceElement)){
- valuesToAdd.add(sourceElement);
- if(DEBUG_EXPANSION){
- Activator.log.debug(DEBUG_PREFIX+"try to drop command created for "+ sourceElement+ " "+iSpecializationType);
- }
- cmd= new Command() {
- @Override
- public void execute() {
- if( iSpecializationType instanceof IHintedType){
- ViewService.createNode(((GraphicalEditPart) targetEditPart).getNotationView(),valuesToAdd.get(0), ((IHintedType)iSpecializationType).getSemanticHint(), ((GraphicalEditPart) targetEditPart).getDiagramPreferencesHint());
- }
- }
-
- };
- cc.add(new CommandProxy( cmd));
- }
- else{
- acceptedElementTypesIndex++;
- }
-
- }
-
- }
- }
-
- return cc.canExecute() ? new ICommandProxy(cc.reduce()) : null;
- }
-
-
- public String getCategoryID() {
- return "org.eclipse.papyrus.infra.gmfdiag.dnd.expansiondropsteategy";
- }
-
- public String getCategoryLabel() {
- return "Expansion element drag and drop";
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.gmfdiag.dnd.strategy;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.diagram.core.services.ViewService;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.IHintedType;
+import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
+import org.eclipse.papyrus.commands.wrappers.GMFtoGEFCommandWrapper;
+import org.eclipse.papyrus.infra.gmfdiag.common.expansion.ChildrenListRepresentation;
+import org.eclipse.papyrus.infra.gmfdiag.common.expansion.DiagramExpansionSingleton;
+import org.eclipse.papyrus.infra.gmfdiag.common.expansion.DiagramExpansionsRegistry;
+import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.AbstractRepresentation;
+import org.eclipse.papyrus.infra.gmfdiag.common.expansionmodel.Representation;
+import org.eclipse.papyrus.infra.gmfdiag.dnd.Activator;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * This strategy has been added in order allow dropping new element done by using expansion model
+ * See Requirement #org.eclipse.papyrus.infra.gmfdiag.expansion.Req_020
+ *
+ */
+public class ExpansionElementDropStrategy extends TransactionalDropStrategy {
+
+ private DiagramExpansionsRegistry diagramExpansionRegistry;
+ private static final String DEBUG_PREFIX = "[EXPANSION_DIAGRAM]";
+ private static final boolean DEBUG_EXPANSION = "true".equalsIgnoreCase(Platform.getDebugOption(
+ "org.eclipse.papyrus.infra.gmfdiag.common/debug/expansion"));
+
+ /**
+ * Constructor.
+ *
+ */
+ public ExpansionElementDropStrategy() {
+ this.diagramExpansionRegistry = DiagramExpansionSingleton.getInstance().getDiagramExpansionRegistry();
+ }
+ public String getLabel() {
+ return "Expansion element drag and drop";
+ }
+
+ public String getID() {
+ return "org.eclipse.papyrus.infra.gmfdiag.dnd.expansiondropsteategy";
+ }
+
+ public String getDescription() {
+ return "This strategy is used to allow dropping of expansion of elements in extended diagrams.";
+ }
+
+ public Image getImage() {
+ return null;
+ }
+
+ public int getPriority() {
+ return 0;
+ }
+
+ public void setOptions(Map<String, Object> options) {
+ // Nothing
+ }
+ /**
+ * get the diagram type from a view.
+ * @param currentView the current view
+ * @return the diagram type it can be also a view point
+ */
+ protected String getDiagramType(View currentView) {
+ Diagram diagram=currentView.getDiagram();
+ String currentDiagramType=null;
+ ViewPrototype viewPrototype=org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils.getPrototype(diagram);
+ if(viewPrototype!=null){
+ currentDiagramType=viewPrototype.getLabel();
+ }
+ else{
+ currentDiagramType=diagram.getType();
+ }
+ return currentDiagramType;
+ }
+ @Override
+ public Command doGetCommand(Request request, final EditPart targetEditPart) {
+
+ CompositeCommand cc = new CompositeCommand(getLabel());
+ if(targetEditPart instanceof GraphicalEditPart){
+ IGraphicalEditPart graphicalEditPart= (IGraphicalEditPart)targetEditPart;
+ String diagramType= getDiagramType(graphicalEditPart.getNotationView());
+ ChildrenListRepresentation listRepresentation=diagramExpansionRegistry.mapChildreen.get(diagramType);
+ //to the current diagram, a expansion is added.
+ if(listRepresentation==null){
+ return null;
+ }
+ //look for all possible children for the current target.
+ List<String>childrenList =listRepresentation.parentChildrenRelation.get(graphicalEditPart.getNotationView().getType());
+ if(childrenList==null){
+ return null;
+ }
+ List<EObject> sourceElements = getSourceEObjects(request);
+ if(sourceElements.size()==0 ){
+ return null;
+ }
+ final List<EObject> valuesToAdd = new ArrayList<EObject>(sourceElements.size());
+ //getList of accepted ElementType
+ final ArrayList<ISpecializationType> acceptedElementTypes= new ArrayList<ISpecializationType>();
+
+
+ for (String posibleID : childrenList) {
+ AbstractRepresentation abstractRepresentation=listRepresentation.IDMap.get(posibleID);
+ if( abstractRepresentation instanceof Representation){
+ String elementTypeID=((Representation)abstractRepresentation).getGraphicalElementType();
+ if( elementTypeID!=null && elementTypeID!=""){
+ final IElementType elementType=ElementTypeRegistry.getInstance().getType(elementTypeID);
+ if( elementType instanceof ISpecializationType){
+ acceptedElementTypes.add((ISpecializationType)elementType);
+ }
+ }
+ }
+ }
+ if(DEBUG_EXPANSION){
+ Activator.log.debug(DEBUG_PREFIX+"try to drop "+ sourceElements+" inside "+graphicalEditPart.getNotationView().getType()+ " accepts "+childrenList);
+ }
+ // get the sub list of accepted source element that match to elementType
+ for (EObject sourceElement : sourceElements) {
+ Command cmd=null;
+ int acceptedElementTypesIndex=0;
+ while (cmd==null &&acceptedElementTypesIndex<acceptedElementTypes.size()){
+ final ISpecializationType iSpecializationType = acceptedElementTypes.get(acceptedElementTypesIndex);
+ IElementMatcher matcher=iSpecializationType.getMatcher();
+ if(matcher!=null && matcher.matches(sourceElement)){
+ valuesToAdd.add(sourceElement);
+ if(DEBUG_EXPANSION){
+ Activator.log.debug(DEBUG_PREFIX+"try to drop command created for "+ sourceElement+ " "+iSpecializationType);
+ }
+ cmd= new Command() {
+ @Override
+ public void execute() {
+ if( iSpecializationType instanceof IHintedType){
+ ViewService.createNode(((GraphicalEditPart) targetEditPart).getNotationView(),valuesToAdd.get(0), ((IHintedType)iSpecializationType).getSemanticHint(), ((GraphicalEditPart) targetEditPart).getDiagramPreferencesHint());
+ }
+ }
+
+ };
+ cc.add(new CommandProxy( cmd));
+ }
+ else{
+ acceptedElementTypesIndex++;
+ }
+
+ }
+
+ }
+ }
+
+ return cc.canExecute() ? new ICommandProxy(cc.reduce()) : null;
+ }
+
+
+ public String getCategoryID() {
+ return "org.eclipse.papyrus.infra.gmfdiag.dnd.expansiondropsteategy";
+ }
+
+ public String getCategoryLabel() {
+ return "Expansion element drag and drop";
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
index fae74791d0c..7804053e118 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
@@ -18,6 +18,9 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.UnexecutableCommand;
import org.eclipse.emf.common.util.EList;
@@ -31,9 +34,12 @@ import org.eclipse.gmf.runtime.common.core.command.ICommand;
import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.CreationMenu;
import org.eclipse.papyrus.infra.newchild.elementcreationmenumodel.Folder;
+import org.eclipse.papyrus.infra.services.edit.internal.context.TypeContext;
import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.swt.SWT;
@@ -140,11 +146,47 @@ public class CreationMenuFactory {
* @return true if sub-menu has been created
*/
protected boolean constructMenu(EObject selectedObject, Menu menu, CreationMenu currentCreationMenu) {
+ String menuType = currentCreationMenu.getElementTypeIdRef();
+
+ // find the destination owner
+ GetEditContextRequest editContextRequest = new GetEditContextRequest(editingDomain, buildRequest(null, selectedObject, menuType), selectedObject);
+ editContextRequest.setEditContext(selectedObject);
+ try {
+ editContextRequest.setClientContext(TypeContext.getContext());
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return false;
+ }
+
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(selectedObject);
+ if (provider == null) {
+ return false;
+ }
+
+ EObject target = selectedObject;
+ Object result = null;
+ ICommand getEditContextCommand = provider.getEditCommand(editContextRequest);
+ if (getEditContextCommand != null) {
+ IStatus status = null;
+ try {
+ status = getEditContextCommand.execute(new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ Activator.log.error(e);
+ return false;
+ }
+ if (!(status == null || !status.isOK())) {
+ result = getEditContextCommand.getCommandResult().getReturnValue();
+ }
+ if(result instanceof EObject) {
+ target = (EObject)result;
+ }
+ }
+
// find the feature between children and owner
- ArrayList<EStructuralFeature> possibleEFeatures = getEreferences(selectedObject, currentCreationMenu);
+ ArrayList<EStructuralFeature> possibleEFeatures = getEreferences(target, currentCreationMenu);
if (possibleEFeatures.size() == 1) {
- Command cmd = buildCommand(null, selectedObject, currentCreationMenu.getElementTypeIdRef());
+ Command cmd = buildCommand(null, target, currentCreationMenu.getElementTypeIdRef());
if (cmd.canExecute()) {
MenuItem item = new MenuItem(menu, SWT.NONE);
fillIcon(currentCreationMenu, item);
@@ -162,7 +204,7 @@ public class CreationMenuFactory {
topMenuItem.setMenu(topMenu);
for (EStructuralFeature eStructuralFeature : possibleEFeatures) {
- Command cmd = buildCommand((EReference) eStructuralFeature, selectedObject, currentCreationMenu.getElementTypeIdRef());
+ Command cmd = buildCommand((EReference) eStructuralFeature, target, currentCreationMenu.getElementTypeIdRef());
if (cmd.canExecute()) {
MenuItem item = new MenuItem(topMenu, SWT.NONE);
fillIcon(currentCreationMenu, item);
@@ -315,14 +357,13 @@ public class CreationMenuFactory {
* @return a command that can be executed by the domain
*/
protected Command buildCommand(EReference reference, EObject container, String extendedType) {
-
-
IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
if (provider == null) {
return UnexecutableCommand.INSTANCE;
}
- ICommand createGMFCommand = provider.getEditCommand(buildRequest(reference, container, extendedType));
+ CreateElementRequest createElementRequest = buildRequest(reference, container, extendedType);
+ ICommand createGMFCommand = provider.getEditCommand(createElementRequest);
if (createGMFCommand != null) {
Command emfCommand = new org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper(createGMFCommand);
return emfCommand;
@@ -333,7 +374,7 @@ public class CreationMenuFactory {
/**
*
* @return
- * the creation request to use in this handler
+ * the creation request to use in this handler
*/
protected CreateElementRequest buildRequest(EReference reference, EObject container, String extendedType) {
if (reference == null) {
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/icons/Switch_12x12.gif b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/icons/Switch_12x12.gif
new file mode 100644
index 00000000000..9a6070c38ef
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/icons/Switch_12x12.gif
Binary files differ
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractReferenceDialog.java
new file mode 100644
index 00000000000..ff403674f92
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/AbstractReferenceDialog.java
@@ -0,0 +1,178 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * This class allow to define a reference value editor.
+ */
+public abstract class AbstractReferenceDialog extends AbstractValueEditor implements IReferenceValueEditor {
+
+ /**
+ * Boolean to detect direct creation.
+ */
+ protected boolean directCreation;
+
+ /**
+ * Indicates whether the widget requires a value or not. If it is mandatory,
+ * it cannot delete/unset its value
+ */
+ protected boolean mandatory;
+
+ /**
+ * Boolean to determinate if the editors are read-only.
+ */
+ protected boolean readOnly;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ */
+ protected AbstractReferenceDialog(final Composite parent) {
+ super(parent);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ * @param label
+ * The label.
+ */
+ protected AbstractReferenceDialog(final Composite parent, final int style, final String label) {
+ super(parent, style, label);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ */
+ protected AbstractReferenceDialog(final Composite parent, final int style) {
+ super(parent, style);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param label
+ * The label.
+ */
+ protected AbstractReferenceDialog(final Composite parent, final String label) {
+ super(parent, label);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.IReferenceValueEditor#setContentProvider(org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider)
+ */
+ @Override
+ public abstract void setContentProvider(final IStaticContentProvider provider);
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.IReferenceValueEditor#setLabelProvider(org.eclipse.jface.viewers.ILabelProvider)
+ */
+ @Override
+ public abstract void setLabelProvider(final ILabelProvider provider);
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.IReferenceValueEditor#setValueFactory(org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory)
+ */
+ @Override
+ public abstract void setValueFactory(final ReferenceValueFactory factory);
+
+ protected abstract void updateControls();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.IReferenceValueEditor#setDirectCreation(boolean)
+ */
+ @Override
+ public void setDirectCreation(final boolean directCreation) {
+ this.directCreation = directCreation;
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.IReferenceValueEditor#setMandatory(boolean)
+ */
+ @Override
+ public void setMandatory(final boolean mandatory) {
+ this.mandatory = mandatory;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#getValue()
+ */
+ @Override
+ public abstract Object getValue();
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#getEditableType()
+ */
+ @Override
+ public Object getEditableType() {
+ return Object.class;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#setReadOnly(boolean)
+ */
+ @Override
+ public void setReadOnly(final boolean readOnly) {
+ this.readOnly = readOnly;
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#isReadOnly()
+ */
+ @Override
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ protected abstract void updateLabel();
+
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IReferenceValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IReferenceValueEditor.java
new file mode 100644
index 00000000000..ebc5deeab3d
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/IReferenceValueEditor.java
@@ -0,0 +1,73 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * This interface allow to define the reference value editor methods to implements.
+ */
+public interface IReferenceValueEditor {
+
+ /**
+ * Sets the Content provider for this editor
+ *
+ * @param provider
+ * The content provider used to retrieve the possible values for this Reference.
+ */
+ void setContentProvider(final IStaticContentProvider provider);
+
+ /**
+ * Sets the Label provider for this editor If the label provider is null, a
+ * default one will be used. The same label provider is used for both the
+ * editor's label and the selection dialog.
+ *
+ * @param provider
+ * The label provider.
+ */
+ void setLabelProvider(final ILabelProvider provider);
+
+ /**
+ * Sets the factory.
+ *
+ * @param factory
+ * The reference value factory.
+ */
+ void setValueFactory(final ReferenceValueFactory factory);
+
+ /**
+ * Sets the direct creation value.
+ *
+ * @param directCreation
+ * Boolean to determinate the direct creation value.
+ */
+ void setDirectCreation(final boolean directCreation);
+
+ /**
+ * Sets the mandatory.
+ *
+ * @param mandatory
+ * The mandatory boolean value.
+ */
+ void setMandatory(final boolean mandatory);
+
+ /**
+ * Sets the read only value.
+ *
+ * @param readOnly
+ * The read only value.
+ */
+ void setReadOnly(final boolean readOnly);
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultiplicityDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultiplicityDialog.java
new file mode 100644
index 00000000000..2c8766fd456
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultiplicityDialog.java
@@ -0,0 +1,605 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.editors;
+
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.widgets.Activator;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.messages.Messages;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.util.MultiplicityConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Widget;
+
+/**
+ * The multiplicity dialog which allow to define 2 'modes' : The simple mode with a string combo editor and the advanced with 2 editors of ValueSpecification.
+ */
+public class MultiplicityDialog extends AbstractValueEditor implements SelectionListener, IChangeListener {
+
+ /**
+ * The string combo index in the list of editors.
+ */
+ protected static final int MULTIPLICITY_STRING_COMBO_INDEX = 0;
+
+ /**
+ * The lower value editor index in the list of editors.
+ */
+ protected static final int MULTIPLICITY_LOWER_VALUE_INDEX = 1;
+
+ /**
+ * The upper value editor index in the list of editors.
+ */
+ protected static final int MULTIPLICITY_UPPER_VALUE_INDEX = 2;
+
+
+ /**
+ * The stack layout for the 'mode' of editor to display.
+ */
+ protected StackLayout stackLayout;
+
+ /**
+ * The string combo editor for the 'simple' mode.
+ */
+ protected StringCombo stringComboEditor;
+
+ /**
+ * The parent stack layout composite.
+ */
+ protected Composite stackLayoutComposite;
+
+ /**
+ * The composite which contains the 'advanced' mode editors.
+ */
+ protected Composite doubleEditorsComposite;
+
+ /**
+ * The lower value specification editor.
+ */
+ protected AbstractReferenceDialog lowerValueEditor;
+
+ /**
+ * The upper value specification editor.
+ */
+ protected AbstractReferenceDialog upperValueEditor;
+
+ /**
+ * The switch editors button.
+ */
+ protected Button switchEditorsButton;
+
+ /**
+ * Boolean to determinate if the editors are read-only.
+ */
+ protected boolean readOnly;
+
+ /**
+ * The preference store.
+ */
+ protected IPreferenceStore preferenceStore;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ */
+ public MultiplicityDialog(final Composite parent, final int style) {
+ this(parent, style, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ * @param preferenceStore
+ * The preference store.
+ */
+ public MultiplicityDialog(final Composite parent, final int style, final IPreferenceStore preferenceStore) {
+ super(parent, style);
+
+ // Create the stack layout composite
+ stackLayout = new StackLayout();
+ stackLayoutComposite = new Composite(this, style);
+ stackLayoutComposite.setLayout(stackLayout);
+ stackLayoutComposite.setLayoutData(getDefaultLayoutData());
+
+ // Create the string combo editor
+ stringComboEditor = new StringCombo(stackLayoutComposite, style);
+ stringComboEditor.setLayoutData(getDefaultLayoutData());
+
+ // Create the composite which contains the lower and the upper value specification editors
+ doubleEditorsComposite = new Composite(stackLayoutComposite, style);
+ final GridLayout layout = new GridLayout(2, true);
+ // Manage the height and the width (for a better visualization)
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ doubleEditorsComposite.setLayout(layout);
+ doubleEditorsComposite.setLayoutData(getDefaultLayoutData());
+
+ // Create the lower ValueSpecification editor
+ lowerValueEditor = createLowerValueSpecificationEditor(doubleEditorsComposite, style);
+ lowerValueEditor.setLayoutData(getDefaultLayoutData());
+
+ // Create the upper ValueSpecification editor
+ upperValueEditor = createUpperValueSpecificationEditor(doubleEditorsComposite, style);
+ upperValueEditor.setLayoutData(getDefaultLayoutData());
+
+ // Add a property change listener on the preference
+ this.preferenceStore = preferenceStore;
+ if (null != preferenceStore) {
+ this.preferenceStore.addPropertyChangeListener(new IPropertyChangeListener() {
+
+ @Override
+ public void propertyChange(final PropertyChangeEvent event) {
+ displayTopControl();
+ }
+ });
+ }
+
+ displayTopControl();
+
+ createButtons();
+ updateControls();
+ }
+
+ /**
+ * This allow to create the lower ValueSpecification editor.
+ *
+ * @param parent
+ * The parent composite
+ * @param style
+ * The style.
+ * @return The create lower ValueSpecification editor.
+ */
+ protected AbstractReferenceDialog createLowerValueSpecificationEditor(final Composite parent, final int style) {
+ return createValueSpecificationEditor(parent, style);
+ }
+
+ /**
+ * This allow to create the upper ValueSpecification editor.
+ *
+ * @param parent
+ * The parent composite
+ * @param style
+ * The style.
+ * @return The create upper ValueSpecification editor.
+ */
+ protected AbstractReferenceDialog createUpperValueSpecificationEditor(final Composite parent, final int style) {
+ return createValueSpecificationEditor(parent, style);
+ }
+
+ /**
+ * This allow to create the ValueSpecification editor.
+ *
+ * @param parent
+ * The parent composite
+ * @param style
+ * The style.
+ * @return The create ValueSpecification editor.
+ */
+ protected AbstractReferenceDialog createValueSpecificationEditor(final Composite parent, final int style) {
+ return new ReferenceDialog(parent, style);
+ }
+
+ /**
+ * This allow to create the buttons.
+ */
+ protected void createButtons() {
+ ((GridLayout) getLayout()).numColumns++;
+
+ switchEditorsButton = factory.createButton(this, null, SWT.PUSH);
+ switchEditorsButton.setImage(Activator.getDefault().getImage("/icons/Switch_12x12.gif")); //$NON-NLS-1$
+ switchEditorsButton.setToolTipText(Messages.MultiplicityReferenceDialog_SwitchEditors);
+ switchEditorsButton.addSelectionListener(this);
+ }
+
+ /**
+ * This allow to manage the stack layout top control displayed.
+ */
+ protected void displayTopControl() {
+ final String multiplicityEditorMode = preferenceStore.getString(MultiplicityConstants.MULTIPLICITY_EDITOR_MODE);
+ if (null != preferenceStore && null != multiplicityEditorMode) {
+ // If the advanced mode is used, display the double editors composite, else use the simple mode with the string combo
+ stackLayout.topControl = multiplicityEditorMode.equals(MultiplicityConstants.ADVANCED_MODE) ? doubleEditorsComposite : stringComboEditor;
+ } else {
+ if (null == stackLayout.topControl) {
+ stackLayout.topControl = stringComboEditor;
+ }
+ }
+
+ if (!stackLayoutComposite.isDisposed()) {
+ stackLayoutComposite.layout();
+ }
+ setReadOnly(readOnly);
+ updateLabels();
+ }
+
+ /**
+ * This allow to define the switch action for the switch buttons.
+ */
+ protected void switchAction() {
+ if (null != preferenceStore) {
+ if (stackLayout.topControl.equals(stringComboEditor)) {
+ preferenceStore.setValue(MultiplicityConstants.MULTIPLICITY_EDITOR_MODE, MultiplicityConstants.ADVANCED_MODE);
+ } else {
+ preferenceStore.setValue(MultiplicityConstants.MULTIPLICITY_EDITOR_MODE, MultiplicityConstants.SIMPLE_MODE);
+ }
+ } else {
+ stackLayout.topControl = stackLayout.topControl.equals(stringComboEditor) ? doubleEditorsComposite : stringComboEditor;
+ }
+ // Refresh the read only value (because the lower and upper values must be different and multiplicity may not be update by simple editor)
+ displayTopControl();
+ }
+
+ /**
+ * Updates the displayed label for the current value
+ */
+ protected void updateLabels() {
+ lowerValueEditor.updateLabel();
+ upperValueEditor.updateLabel();
+ }
+
+ /**
+ * This allow to update the controls.
+ */
+ protected void updateControls() {
+ if (stackLayout.topControl.equals(stringComboEditor)) {
+ if (!stringComboEditor.isDisposed()) {
+ stringComboEditor.updateControls();
+ }
+ } else {
+ if (!lowerValueEditor.isDisposed()) {
+ lowerValueEditor.updateControls();
+ }
+
+ if (!upperValueEditor.isDisposed()) {
+ upperValueEditor.updateControls();
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Control#update()
+ */
+ @Override
+ public void update() {
+ super.update();
+ if (stackLayout.topControl.equals(stringComboEditor)) {
+ if (!stringComboEditor.isDisposed()) {
+ stringComboEditor.update();
+ }
+ } else {
+ if (!lowerValueEditor.isDisposed()) {
+ lowerValueEditor.update();
+ }
+
+ if (!upperValueEditor.isDisposed()) {
+ upperValueEditor.update();
+ }
+ }
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractListEditor#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+ if (null != stringComboEditor) {
+ stringComboEditor.doBinding();
+ }
+ if (null != lowerValueEditor) {
+ lowerValueEditor.doBinding();
+ }
+ if (null != upperValueEditor) {
+ upperValueEditor.doBinding();
+ }
+ modelProperty.addChangeListener(this);
+ }
+
+ /**
+ * Sets the content providers.
+ *
+ * @param providers
+ * The content providers for each editor.
+ */
+ public void setContentProviders(final List<IStaticContentProvider> providers) {
+ stringComboEditor.setContentProvider(getObjectFromList(providers, MULTIPLICITY_STRING_COMBO_INDEX));
+ lowerValueEditor.setContentProvider(getObjectFromList(providers, MULTIPLICITY_LOWER_VALUE_INDEX));
+ upperValueEditor.setContentProvider(getObjectFromList(providers, MULTIPLICITY_UPPER_VALUE_INDEX));
+ }
+
+ /**
+ * Sets the label providers.
+ *
+ * @param providers
+ * The label providers for each editor.
+ */
+ public void setLabelProviders(final List<ILabelProvider> providers) {
+ stringComboEditor.setLabelProvider(getObjectFromList(providers, MULTIPLICITY_STRING_COMBO_INDEX));
+ lowerValueEditor.setLabelProvider(getObjectFromList(providers, MULTIPLICITY_LOWER_VALUE_INDEX));
+ upperValueEditor.setLabelProvider(getObjectFromList(providers, MULTIPLICITY_UPPER_VALUE_INDEX));
+
+ updateControls();
+ updateLabels();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#getEditableType()
+ */
+ @Override
+ public Object getEditableType() {
+ return Object.class;
+ }
+
+ /**
+ * This allow to define if the string combo can be edited.
+ *
+ * @return <code>true</code> if the string combo can be edited, <code>false</code> otherwise.
+ */
+ protected boolean canEditStringCombo() {
+ return true;
+ }
+
+ /**
+ * This allow to define if the lower value can be edited.
+ *
+ * @return <code>true</code> if the lower value can be edited, <code>false</code> otherwise.
+ */
+ protected boolean canEditLowerValue() {
+ return true;
+ }
+
+ /**
+ * This allow to define if the upper value can be edited.
+ *
+ * @return <code>true</code> if the upper value can be edited, <code>false</code> otherwise.
+ */
+ protected boolean canEditUpperValue() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractListEditor#setModelObservable(org.eclipse.core.databinding.observable.list.IObservableList)
+ */
+ @Override
+ public void setModelObservable(final IObservableValue modelProperty) {
+ setWidgetObservable(modelProperty);
+ setEditorsModelObservable(modelProperty);
+ super.setModelObservable(modelProperty);
+
+ updateControls();
+ updateLabels();
+ }
+
+ /**
+ * Sets the model properties for the editors.
+ *
+ * @param modelProperty
+ * The observable value.
+ */
+ protected void setEditorsModelObservable(final IObservableValue modelProperty) {
+ if (null != modelProperty && modelProperty.getValue() instanceof List<?>) {
+ final Object stringComboObservableValue = getObjectFromList((List<?>) modelProperty.getValue(), MULTIPLICITY_STRING_COMBO_INDEX);
+ if (stringComboObservableValue instanceof IObservableValue) {
+ stringComboEditor.setModelObservable((IObservableValue) stringComboObservableValue);
+ }
+ final Object lowerValueObservableValue = getObjectFromList((List<?>) modelProperty.getValue(), MULTIPLICITY_LOWER_VALUE_INDEX);
+ if (lowerValueObservableValue instanceof IObservableValue) {
+ lowerValueEditor.setModelObservable((IObservableValue) lowerValueObservableValue);
+ }
+ final Object upperValueObservableValue = getObjectFromList((List<?>) modelProperty.getValue(), MULTIPLICITY_UPPER_VALUE_INDEX);
+ if (upperValueObservableValue instanceof IObservableValue) {
+ upperValueEditor.setModelObservable((IObservableValue) upperValueObservableValue);
+ }
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)
+ */
+ @Override
+ public void setToolTipText(String text) {
+ stringComboEditor.setToolTipText(text);
+ lowerValueEditor.setToolTipText(Messages.MultiplicityReferenceDialog_LowerValueToolTip);
+ upperValueEditor.setToolTipText(Messages.MultiplicityReferenceDialog_UpperValueToolTip);
+ }
+
+ /**
+ * Sets the value factories.
+ *
+ * @param factories
+ * The Reference Value factories.
+ */
+ public void setValueFactories(final List<ReferenceValueFactory> factories) {
+ lowerValueEditor.setValueFactory(getObjectFromList(factories, MULTIPLICITY_LOWER_VALUE_INDEX));
+ upperValueEditor.setValueFactory(getObjectFromList(factories, MULTIPLICITY_UPPER_VALUE_INDEX));
+ updateControls();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#setReadOnly(boolean)
+ */
+ @Override
+ public void setReadOnly(final boolean readOnly) {
+ this.readOnly = readOnly;
+ if (stackLayout.topControl.equals(stringComboEditor)) {
+ if (!stringComboEditor.isDisposed()) {
+ stringComboEditor.setReadOnly(readOnly || !canEditStringCombo());
+ }
+ } else {
+ if (!lowerValueEditor.isDisposed()) {
+ lowerValueEditor.setReadOnly(readOnly || !canEditLowerValue());
+ }
+ if (!upperValueEditor.isDisposed()) {
+ upperValueEditor.setReadOnly(readOnly || !canEditUpperValue());
+ }
+ }
+ updateControls();
+ }
+
+ /**
+ * This allow to set the direct creation of the lower and the upper value editors.
+ *
+ * @param directCreation
+ * The direct creation value.
+ */
+ public void setDirectCreation(final boolean directCreation) {
+ lowerValueEditor.setDirectCreation(directCreation);
+ upperValueEditor.setDirectCreation(directCreation);
+ updateControls();
+ }
+
+ /**
+ * This allow to set the mandatory of the lower and the upper value editors.
+ *
+ * @param mandatory
+ * The mandatory value.
+ */
+ public void setMandatory(final boolean mandatory) {
+ lowerValueEditor.setMandatory(mandatory);
+ upperValueEditor.setMandatory(mandatory);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractEditor#isReadOnly()
+ */
+ @Override
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ Widget widget = e.widget;
+ if (widget == switchEditorsButton) {
+ switchAction();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ // Nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.swt.widgets.Widget#dispose()
+ */
+ @Override
+ public void dispose() {
+ if (null != stringComboEditor) {
+ stringComboEditor.dispose();
+ }
+ if (null != lowerValueEditor) {
+ lowerValueEditor.dispose();
+ }
+ if (null != upperValueEditor) {
+ upperValueEditor.dispose();
+ }
+ super.dispose();
+ }
+
+ /**
+ * Get the object index from the list of objects.
+ *
+ * @param listObjects
+ * The list of objects.
+ * @param index
+ * The index object to get.
+ * @return The object at the index position or <code>null</code>.
+ */
+ protected <T> T getObjectFromList(final List<T> listObjects, final int index) {
+ T object = null;
+ if (null != listObjects && !listObjects.isEmpty()) {
+ if (listObjects.size() > index) {
+ object = listObjects.get(index);
+ }
+ }
+ return object;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.widgets.editors.AbstractValueEditor#getValue()
+ *
+ * @return
+ */
+ @Override
+ public Object getValue() {
+ return modelProperty.getValue();
+ }
+
+ /**
+ * Redefine this method to re-affect the correct observable value to each editors.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.IChangeListener#handleChange(org.eclipse.core.databinding.observable.ChangeEvent)
+ */
+ @Override
+ public void handleChange(ChangeEvent event) {
+ // Manage the modification of observable values by runnable to not freeze the UI modification
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ setEditorsModelObservable(modelProperty);
+ }
+ });
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
index b81c528e081..5cee8a0585e 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/ReferenceDialog.java
@@ -35,6 +35,7 @@ import org.eclipse.papyrus.infra.widgets.Activator;
import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
import org.eclipse.papyrus.infra.widgets.databinding.CLabelObservableValue;
import org.eclipse.papyrus.infra.widgets.databinding.ReferenceDialogObservableValue;
+import org.eclipse.papyrus.infra.widgets.databinding.StyledTextReferenceDialogObservableValue;
import org.eclipse.papyrus.infra.widgets.messages.Messages;
import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
@@ -61,7 +62,7 @@ import org.eclipse.swt.widgets.Widget;
* @author Camille Letavernier
*
*/
-public class ReferenceDialog extends AbstractValueEditor implements SelectionListener {
+public class ReferenceDialog extends AbstractReferenceDialog implements SelectionListener {
/**
* The CLabel displaying the current value
@@ -306,8 +307,10 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
binding.updateModelToTarget();
} else {
- currentValueLabel.setImage(labelProvider.getImage(getValue()));
- currentValueLabel.setText(labelProvider.getText(getValue()));
+ if (null != labelProvider) {
+ currentValueLabel.setImage(labelProvider.getImage(getValue()));
+ currentValueLabel.setText(labelProvider.getText(getValue()));
+ }
}
}
@@ -318,6 +321,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
* The content provider used to retrieve the possible values for
* this Reference
*/
+ @Override
public void setContentProvider(IStaticContentProvider provider) {
dialog.setContentProvider(new EncapsulatedContentProvider(provider));
if (getValue() != null) {
@@ -335,6 +339,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
* @param provider
* The label provider
*/
+ @Override
public void setLabelProvider(ILabelProvider provider) {
if (provider == null) {
setLabelProvider(new LabelProvider());
@@ -408,17 +413,29 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
@Override
public void setModelObservable(IObservableValue modelProperty) {
- setWidgetObservable(new ReferenceDialogObservableValue(this, this.currentValueLabel, modelProperty, labelProvider));
+ setWidgetObservable(createWidgetObservable(modelProperty));
super.setModelObservable(modelProperty);
updateControls();
}
+ /**
+ * This allow to create the widget observable value.
+ *
+ * @param modelProperty
+ * The current observable value.
+ * @return The created {@link StyledTextReferenceDialogObservableValue}.
+ */
+ protected IObservableValue createWidgetObservable(final IObservableValue modelProperty) {
+ return new ReferenceDialogObservableValue(this, this.currentValueLabel, modelProperty, labelProvider);
+ }
+
@Override
public void setToolTipText(String text) {
super.setLabelToolTipText(text);
currentValueLabel.setToolTipText(text);
}
+ @Override
public void setValueFactory(ReferenceValueFactory factory) {
valueFactory = factory;
updateControls();
@@ -446,6 +463,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
/**
* Updates the buttons' status
*/
+ @Override
protected void updateControls() {
// Check if the edit & create buttons should be displayed
boolean exclude = valueFactory == null || !valueFactory.canCreateObject();
@@ -478,6 +496,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
updateControls();
}
+ @Override
public void setDirectCreation(boolean directCreation) {
this.directCreation = directCreation;
updateControls();
@@ -508,6 +527,7 @@ public class ReferenceDialog extends AbstractValueEditor implements SelectionLis
this.dialog.setInput(input);
}
+ @Override
public void setMandatory(boolean mandatory) {
this.mandatory = mandatory;
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java
index 2811f2d1e55..f4375f11024 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextReferenceDialog.java
@@ -39,6 +39,7 @@ import org.eclipse.papyrus.infra.widgets.messages.Messages;
import org.eclipse.papyrus.infra.widgets.providers.EncapsulatedContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
@@ -62,7 +63,7 @@ import org.eclipse.swt.widgets.Widget;
* Duplicated code from {@link ReferenceDialog}, replacing CLabel by {@link StyledTextStringEditor}
*
*/
-public class StyledTextReferenceDialog extends AbstractValueEditor implements SelectionListener {
+public class StyledTextReferenceDialog extends AbstractReferenceDialog implements SelectionListener {
/**
* The styled text displaying the current value
@@ -167,7 +168,22 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* The style of the styled text.
*/
public StyledTextReferenceDialog(final Composite parent, final int style) {
+ this(parent, style, null);
+ }
+
+ /**
+ * Constructs a new ReferenceDialog in the given parent Composite. The style will be applied to the styled text displaying the current value. This constructor manage the value validator.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style of the styled text.
+ * @param targetValidator
+ * The validator used for the styled text.
+ */
+ public StyledTextReferenceDialog(final Composite parent, final int style, final AbstractValidator targetValidator) {
super(parent, style);
+ this.targetValidator = targetValidator;
GridData gridData = getDefaultLayoutData();
styledTextStringEditor = createStyledTextStringEditor(this, null, factory.getBorderStyle() | style);
@@ -215,7 +231,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* @return The created {@link StyledTextStringEditor}.
*/
protected StyledTextStringEditor createStyledTextStringEditor(final Composite parent, final String initialValue, final int style) {
- StyledTextStringEditor editor = new StyledTextStringEditor(parent, style);
+ StyledTextStringEditor editor = new StyledTextStringEditor(parent, style, targetValidator);
editor.setValue(initialValue);
return editor;
}
@@ -356,7 +372,9 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
binding.updateModelToTarget();
} else {
- styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ if (null != labelProvider) {
+ styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ }
}
}
@@ -367,6 +385,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* The content provider used to retrieve the possible values for
* this Reference
*/
+ @Override
public void setContentProvider(final IStaticContentProvider provider) {
dialog.setContentProvider(new EncapsulatedContentProvider(provider));
if (getValue() != null) {
@@ -384,6 +403,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* @param provider
* The label provider
*/
+ @Override
public void setLabelProvider(final ILabelProvider provider) {
if (provider == null) {
setLabelProvider(new LabelProvider());
@@ -451,14 +471,6 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
}
/**
- * {@inheritDoc}
- */
- @Override
- protected void doBinding() {
- super.doBinding();
- }
-
- /**
* Set the initial selection.
*
* @param initialValues
@@ -510,6 +522,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* @param factory
* The reference value factory.
*/
+ @Override
public void setValueFactory(final ReferenceValueFactory factory) {
valueFactory = factory;
updateControls();
@@ -547,6 +560,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
/**
* Updates the buttons' status
*/
+ @Override
protected void updateControls() {
// Check if the edit & create buttons should be displayed
boolean exclude = valueFactory == null || !valueFactory.canCreateObject();
@@ -590,6 +604,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* @param directCreation
* Boolean to determinate the direct creation value.
*/
+ @Override
public void setDirectCreation(final boolean directCreation) {
this.directCreation = directCreation;
updateControls();
@@ -633,6 +648,7 @@ public class StyledTextReferenceDialog extends AbstractValueEditor implements Se
* @param mandatory
* The mandatory boolean value.
*/
+ @Override
public void setMandatory(final boolean mandatory) {
this.mandatory = mandatory;
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java
index 6f82b025613..ae1075cfe50 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/StyledTextStringEditor.java
@@ -24,6 +24,7 @@ import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.papyrus.infra.widgets.databinding.StyledTextObservableValue;
import org.eclipse.papyrus.infra.widgets.selectors.StringSelector;
+import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.events.KeyEvent;
@@ -68,7 +69,6 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
/**
- *
* Constructor.
*
* @param parent
@@ -78,11 +78,23 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
*/
public StyledTextStringEditor(Composite parent, int style) {
this(parent, style, null, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT);
-
}
/**
+ * Constructor.
*
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param targetValidator
+ * The validator used for the styled text.
+ */
+ public StyledTextStringEditor(final Composite parent, final int style, final AbstractValidator targetValidator) {
+ this(parent, style, null, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT, targetValidator);
+ }
+
+ /**
* Constructor.
*
* @param parent
@@ -97,7 +109,22 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
}
/**
+ * Constructor.
*
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param label
+ * The label for this editor
+ * @param targetValidator
+ * The validator used for the styled text.
+ */
+ public StyledTextStringEditor(final Composite parent, final int style, final String label, final AbstractValidator targetValidator) {
+ this(parent, style, label, DEFAULT_HEIGHT_HINT, DEFAULT_WIDTH_HINT, targetValidator);
+ }
+
+ /**
* Constructor.
*
* @param parent
@@ -114,7 +141,6 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
}
/**
- *
* Constructor.
*
* @param parent
@@ -129,20 +155,43 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
* Width hint of the text area in multiline mode
*/
public StyledTextStringEditor(Composite parent, int style, String label, int heighHint, int widthHint) {
+ this(parent, style, label, heighHint, widthHint, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which this editor should be displayed
+ * @param style
+ * The style for this editor's text box
+ * @param label
+ * The label for this editor
+ * @param heighHint
+ * Height hint of the text area in multiline mode
+ * @param widthHint
+ * Width hint of the text area in multiline mode
+ * @param targetValidator
+ * The validator used for the styled text.
+ */
+ public StyledTextStringEditor(final Composite parent, final int style, final String label, final int heighHint, final int widthHint, final AbstractValidator targetValidator) {
super(parent, label);
+ this.targetValidator = targetValidator;
+
GridData data = getDefaultLayoutData();
data.grabExcessVerticalSpace = true;
data.grabExcessHorizontalSpace = true;
data.verticalAlignment = SWT.FILL;
data.horizontalAlignment = SWT.FILL;
+ int styledTextStyle = style;
if ((style & SWT.MULTI) != 0) {
data.minimumHeight = heighHint;
data.minimumWidth = widthHint;
- style = style | SWT.V_SCROLL;
+ styledTextStyle = style | SWT.V_SCROLL;
}
- text = createStyledText(this, null, style);
+ text = createStyledText(this, null, styledTextStyle);
text.setLayoutData(data);
if (label != null) {
@@ -164,7 +213,6 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
layout.marginWidth = 0;
pack();
-
}
@@ -279,7 +327,7 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
commit();
changeColorField();
}
-
+
@Override
public void setToolTipText(String tooltip) {
text.setToolTipText(tooltip);
@@ -295,7 +343,7 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
if (value instanceof String) {
this.text.setText((String) value);
} else {
- this.text.setText(""); //$NON-NLS-1$;
+ this.text.setText(""); //$NON-NLS-1$
}
}
@@ -378,11 +426,11 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
timer.schedule(currentValidateTask, delay);
}
if (targetValidator != null) {
- IStatus status = targetValidator.validate(text.getText());
+ IStatus status = targetValidator.validate(getTextToValidate());
updateStatus(status);
}
if (modelValidator != null) {
- IStatus status = modelValidator.validate(text.getText());
+ IStatus status = modelValidator.validate(getTextToValidate());
updateStatus(status);
if (binding == null) {
update();
@@ -406,6 +454,15 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
}
}
+ /**
+ * Gets the string to validate.
+ *
+ * @return The string text to validate.
+ */
+ protected String getTextToValidate() {
+ return text.getText();
+ }
+
@Override
public void dispose() {
cancelCurrentTask();
@@ -423,29 +480,30 @@ public class StyledTextStringEditor extends AbstractValueEditor implements KeyLi
@Override
public void updateStatus(IStatus status) {
- switch (status.getSeverity()) {
- case IStatus.OK:
- controlDecoration.hide();
- break;
- case IStatus.WARNING:
- FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
- controlDecoration.setImage(warning.getImage());
- controlDecoration.showHoverText(status.getMessage());
- controlDecoration.setDescriptionText(status.getMessage());
- controlDecoration.show();
- break;
- case IStatus.ERROR:
- FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
- controlDecoration.setImage(error.getImage());
- controlDecoration.showHoverText(status.getMessage());
- controlDecoration.setDescriptionText(status.getMessage());
- controlDecoration.show();
- break;
- default:
- controlDecoration.hide();
- break;
+ if(!isDisposed()){
+ switch (status.getSeverity()) {
+ case IStatus.OK:
+ controlDecoration.hide();
+ break;
+ case IStatus.WARNING:
+ FieldDecoration warning = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING);
+ controlDecoration.setImage(warning.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ case IStatus.ERROR:
+ FieldDecoration error = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_ERROR);
+ controlDecoration.setImage(error.getImage());
+ controlDecoration.showHoverText(status.getMessage());
+ controlDecoration.setDescriptionText(status.getMessage());
+ controlDecoration.show();
+ break;
+ default:
+ controlDecoration.hide();
+ break;
+ }
}
-
}
@Override
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
index 510d05e4497..9cc4b1d79c0 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/Messages.java
@@ -1,132 +1,141 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 402525
- *
- *****************************************************************************/
-package org.eclipse.papyrus.infra.widgets.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * The Class Messages.
- */
-public class Messages extends NLS {
-
- /** The Constant BUNDLE_NAME. */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.widgets.messages.messages"; //$NON-NLS-1$
-
- public static String BooleanInputValidator_NotABoolean;
-
- public static String IntegerInputValidator_NotAnIntegerMessage;
-
- public static String RealInputValidator_NotaRealMessage;
-
- public static String UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage;
-
- public static String MultipleStringFileEditor_0;
-
- public static String MultipleStringFileEditor_1;
-
- public static String MultipleStringFileEditor_2;
-
- public static String MultipleValueEditAndSelectionWidget_EditSelectedElement;
-
- /** The Multiple value editor_ add elements. */
- public static String MultipleValueEditor_AddElements;
-
- public static String MultipleValueEditor_addOperation;
-
- public static String MultipleValueEditor_editOperation;
-
- /** The Multiple value editor_ edit selected value */
- public static String MultipleValueEditor_EditSelectedValue;
-
- /** The Multiple value editor_ move selected elements down. */
- public static String MultipleValueEditor_MoveSelectedElementsDown;
-
- /** The Multiple value editor_ move selected elements up. */
- public static String MultipleValueEditor_MoveSelectedElementsUp;
-
- /** The Multiple value editor_ remove selected elements. */
- public static String MultipleValueEditor_RemoveSelectedElements;
-
- /** The Multiple value selector dialog_ add all elements. */
- public static String MultipleValueSelectorDialog_AddAllElements;
-
- /** The Multiple value selector dialog_ add selected elements. */
- public static String MultipleValueSelectorDialog_AddSelectedElements;
-
- /** The Multiple value selector dialog_ create new element */
- public static String MultipleValueSelectorDialog_CreateNewElement;
-
- /** The Multiple value selector dialog_ delete new element */
- public static String MultipleValueSelectorDialog_DeleteNewElement;
-
- /** The Multiple value selector dialog_ remove all elements. */
- public static String MultipleValueSelectorDialog_RemoveAllElements;
-
- public static String ReferenceDialog_0;
-
- public static String ReferenceDialog_1;
-
- public static String ReferenceDialog_CreateANewObject;
-
- public static String ReferenceDialog_editOperation;
-
- public static String ReferenceDialog_EditTheCurrentValue;
-
- /** The Reference dialog_ edit value */
- public static String ReferenceDialog_EditValue;
-
- /** The Reference dialog_ select value */
- public static String ReferenceDialog_SelectValue;
-
- public static String ReferenceDialog_setOperation;
-
- /** The Reference dialog_ unset */
- public static String ReferenceDialog_Unset;
-
- /** The Reference dialog_ edit unset value */
- public static String ReferenceDialog_UnsetValue;
-
- /** Indicates that a list of elements have different values for the given property (Multi-selection) */
- public static String ReferenceDialogObservable_Unchanged;
-
- /** the Enum radio_ no value */
- public static String EnumRadio_NoValue;
-
- public static String FlattenableRestrictedFilteredContentProvider_AllPossibleContentsMessage;
-
- public static String FlattenableRestrictedFilteredContentProvider_FlatViewMessage;
-
- public static String IntegerMask_ErrorTooManyValues;
-
- public static String ProviderBasedBrowseStrategy_0;
-
- public static String StringEditionFactory_EnterANewValue;
-
- public static String StringFileSelector_0;
-
- public static String StringFileSelector_Browse;
-
- public static String StringFileSelector_BrowseWorkspace;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Instantiates a new messages.
- */
- private Messages() {
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 402525
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Class Messages.
+ */
+public class Messages extends NLS {
+
+ /** The Constant BUNDLE_NAME. */
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.widgets.messages.messages"; //$NON-NLS-1$
+
+ public static String BooleanInputValidator_NotABoolean;
+
+ public static String IntegerInputValidator_NotAnIntegerMessage;
+
+ public static String RealInputValidator_NotaRealMessage;
+
+ public static String UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage;
+
+ public static String MultipleStringFileEditor_0;
+
+ public static String MultipleStringFileEditor_1;
+
+ public static String MultipleStringFileEditor_2;
+
+ public static String MultipleValueEditAndSelectionWidget_EditSelectedElement;
+
+ /** The Multiple value editor_ add elements. */
+ public static String MultipleValueEditor_AddElements;
+
+ public static String MultipleValueEditor_addOperation;
+
+ public static String MultipleValueEditor_editOperation;
+
+ /** The Multiple value editor_ edit selected value */
+ public static String MultipleValueEditor_EditSelectedValue;
+
+ /** The Multiple value editor_ move selected elements down. */
+ public static String MultipleValueEditor_MoveSelectedElementsDown;
+
+ /** The Multiple value editor_ move selected elements up. */
+ public static String MultipleValueEditor_MoveSelectedElementsUp;
+
+ /** The Multiple value editor_ remove selected elements. */
+ public static String MultipleValueEditor_RemoveSelectedElements;
+
+ /** The Multiple value selector dialog_ add all elements. */
+ public static String MultipleValueSelectorDialog_AddAllElements;
+
+ /** The Multiple value selector dialog_ add selected elements. */
+ public static String MultipleValueSelectorDialog_AddSelectedElements;
+
+ /** The Multiple value selector dialog_ create new element */
+ public static String MultipleValueSelectorDialog_CreateNewElement;
+
+ /** The Multiple value selector dialog_ delete new element */
+ public static String MultipleValueSelectorDialog_DeleteNewElement;
+
+ /** The Multiple value selector dialog_ remove all elements. */
+ public static String MultipleValueSelectorDialog_RemoveAllElements;
+
+ public static String ReferenceDialog_0;
+
+ public static String ReferenceDialog_1;
+
+ public static String ReferenceDialog_CreateANewObject;
+
+ public static String ReferenceDialog_editOperation;
+
+ public static String ReferenceDialog_EditTheCurrentValue;
+
+ /** The Reference dialog_ edit value */
+ public static String ReferenceDialog_EditValue;
+
+ /** The Reference dialog_ select value */
+ public static String ReferenceDialog_SelectValue;
+
+ public static String ReferenceDialog_setOperation;
+
+ /** The Reference dialog_ unset */
+ public static String ReferenceDialog_Unset;
+
+ /** The Reference dialog_ edit unset value */
+ public static String ReferenceDialog_UnsetValue;
+
+ /** Indicates that a list of elements have different values for the given property (Multi-selection) */
+ public static String ReferenceDialogObservable_Unchanged;
+
+ /** The switch editors label for Multiplicity reference dialog. */
+ public static String MultiplicityReferenceDialog_SwitchEditors;
+
+ /** The lower value tool tip for Multiplicity reference dialog. */
+ public static String MultiplicityReferenceDialog_LowerValueToolTip;
+
+ /** The upper value tool tip for Multiplicity reference dialog. */
+ public static String MultiplicityReferenceDialog_UpperValueToolTip;
+
+ /** the Enum radio_ no value */
+ public static String EnumRadio_NoValue;
+
+ public static String FlattenableRestrictedFilteredContentProvider_AllPossibleContentsMessage;
+
+ public static String FlattenableRestrictedFilteredContentProvider_FlatViewMessage;
+
+ public static String IntegerMask_ErrorTooManyValues;
+
+ public static String ProviderBasedBrowseStrategy_0;
+
+ public static String StringEditionFactory_EnterANewValue;
+
+ public static String StringFileSelector_0;
+
+ public static String StringFileSelector_Browse;
+
+ public static String StringFileSelector_BrowseWorkspace;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Instantiates a new messages.
+ */
+ private Messages() {
+ }
+}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
index 8a3e48b30b3..2aa21d64ea1 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/messages/messages.properties
@@ -1,54 +1,57 @@
-###############################################################################
-# Copyright (c) 2010, 2014 CEA LIST and others.
-#
-# 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:
-# Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
-# Christian W. Damus (CEA) - bug 402525
-#
-###############################################################################
-
-BooleanInputValidator_NotABoolean=The actual entry is not a Boolean.
-IntegerInputValidator_NotAnIntegerMessage=The actual entry is not an Integer.
-RealInputValidator_NotaRealMessage=The actual entry is not a Real.
-UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage=The actual entry is not an UnlimitedNatural. An UnlimitedNatural must be either -1, * or >= 0
-MultipleStringFileEditor_0=Browse file system
-MultipleStringFileEditor_1=Browse workspace
-MultipleStringFileEditor_2=FilterExtensions and FilterNames do not match
-MultipleValueEditAndSelectionWidget_EditSelectedElement=Edit selected Element
-MultipleValueEditor_AddElements=Add elements
-MultipleValueEditor_addOperation=Add {0}
-MultipleValueEditor_editOperation=Edit {0}
-MultipleValueEditor_EditSelectedValue=Edit the selected value
-MultipleValueEditor_MoveSelectedElementsDown=Move selected elements down
-MultipleValueEditor_MoveSelectedElementsUp=Move selected elements up
-MultipleValueEditor_RemoveSelectedElements=Remove selected elements
-MultipleValueSelectorDialog_AddAllElements=Add all elements
-MultipleValueSelectorDialog_AddSelectedElements=Add selected elements
-MultipleValueSelectorDialog_RemoveAllElements=Remove all elements
-MultipleValueSelectorDialog_CreateNewElement=Create a new element
-MultipleValueSelectorDialog_DeleteNewElement=Deletes a newly created element
-ReferenceDialog_0=An error occured while setting the value.
-ReferenceDialog_1=An error occured while setting the value.
-ReferenceDialog_CreateANewObject=Create a new object
-ReferenceDialog_editOperation=Edit {0}
-ReferenceDialog_EditTheCurrentValue=Edit the current value
-ReferenceDialog_EditValue=Edit the reference value
-ReferenceDialog_SelectValue=Select the value for this reference
-ReferenceDialog_setOperation=Set {0}
-ReferenceDialog_Unset=<Undefined>
-ReferenceDialog_UnsetValue=Unset the reference value
-ReferenceDialogObservable_Unchanged=<Unchanged>
-EnumRadio_NoValue=There is no value to select
-FlattenableRestrictedFilteredContentProvider_AllPossibleContentsMessage=Show all possible values
-FlattenableRestrictedFilteredContentProvider_FlatViewMessage=Flat View
-StringEditionFactory_EnterANewValue=Enter the new value
-StringFileSelector_0=FilterExtensions and FilterNames do not match
-StringFileSelector_Browse=Browse
-StringFileSelector_BrowseWorkspace=Browse workspace
-IntegerMask_ErrorTooManyValues=The mask-based integer editor cannot be used with more than 32 values
-ProviderBasedBrowseStrategy_0=The provider has not been initialized
+###############################################################################
+# Copyright (c) 2010, 2014 CEA LIST and others.
+#
+# 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:
+# Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+# Christian W. Damus (CEA) - bug 402525
+#
+###############################################################################
+
+BooleanInputValidator_NotABoolean=The actual entry is not a Boolean.
+IntegerInputValidator_NotAnIntegerMessage=The actual entry is not an Integer.
+RealInputValidator_NotaRealMessage=The actual entry is not a Real.
+UnlimitedNaturalInputValidator_NotAnUnlimitedNaturalMessage=The actual entry is not an UnlimitedNatural. An UnlimitedNatural must be either -1, * or >= 0
+MultipleStringFileEditor_0=Browse file system
+MultipleStringFileEditor_1=Browse workspace
+MultipleStringFileEditor_2=FilterExtensions and FilterNames do not match
+MultipleValueEditAndSelectionWidget_EditSelectedElement=Edit selected Element
+MultipleValueEditor_AddElements=Add elements
+MultipleValueEditor_addOperation=Add {0}
+MultipleValueEditor_editOperation=Edit {0}
+MultipleValueEditor_EditSelectedValue=Edit the selected value
+MultipleValueEditor_MoveSelectedElementsDown=Move selected elements down
+MultipleValueEditor_MoveSelectedElementsUp=Move selected elements up
+MultipleValueEditor_RemoveSelectedElements=Remove selected elements
+MultipleValueSelectorDialog_AddAllElements=Add all elements
+MultipleValueSelectorDialog_AddSelectedElements=Add selected elements
+MultipleValueSelectorDialog_RemoveAllElements=Remove all elements
+MultipleValueSelectorDialog_CreateNewElement=Create a new element
+MultipleValueSelectorDialog_DeleteNewElement=Deletes a newly created element
+ReferenceDialog_0=An error occured while setting the value.
+ReferenceDialog_1=An error occured while setting the value.
+ReferenceDialog_CreateANewObject=Create a new object
+ReferenceDialog_editOperation=Edit {0}
+ReferenceDialog_EditTheCurrentValue=Edit the current value
+ReferenceDialog_EditValue=Edit the reference value
+ReferenceDialog_SelectValue=Select the value for this reference
+ReferenceDialog_setOperation=Set {0}
+ReferenceDialog_Unset=<Undefined>
+ReferenceDialog_UnsetValue=Unset the reference value
+ReferenceDialogObservable_Unchanged=<Unchanged>
+MultiplicityReferenceDialog_SwitchEditors=Switch editors
+MultiplicityReferenceDialog_LowerValueToolTip=Lower ValueSpecification
+MultiplicityReferenceDialog_UpperValueToolTip=Upper ValueSpecification
+EnumRadio_NoValue=There is no value to select
+FlattenableRestrictedFilteredContentProvider_AllPossibleContentsMessage=Show all possible values
+FlattenableRestrictedFilteredContentProvider_FlatViewMessage=Flat View
+StringEditionFactory_EnterANewValue=Enter the new value
+StringFileSelector_0=FilterExtensions and FilterNames do not match
+StringFileSelector_Browse=Browse
+StringFileSelector_BrowseWorkspace=Browse workspace
+IntegerMask_ErrorTooManyValues=The mask-based integer editor cannot be used with more than 32 values
+ProviderBasedBrowseStrategy_0=The provider has not been initialized
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/MultiplicityConstants.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/MultiplicityConstants.java
new file mode 100644
index 00000000000..69b6372375d
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/util/MultiplicityConstants.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.widgets.util;
+
+/**
+ * The multiplicity constants.
+ */
+public interface MultiplicityConstants {
+
+ /**
+ * The multiplicity editor preference identifier.
+ */
+ public static final String MULTIPLICITY_EDITOR_MODE = "multiplicityEditorMode"; //$NON-NLS-1$
+
+ /**
+ * The simple mode preference identifier.
+ */
+ public static final String SIMPLE_MODE = "simpleMode"; //$NON-NLS-1$
+
+ /**
+ * The simple mode text value display.
+ */
+ public static final String SIMPLE_MODE_TEXT_VALUE = "Simple mode"; //$NON-NLS-1$
+
+ /**
+ * The advanced mode preference identifier.
+ */
+ public static final String ADVANCED_MODE = "advanceMode"; //$NON-NLS-1$
+
+ /**
+ * The advanced mode text value display.
+ */
+ public static final String ADVANCED_MODE_TEXT_VALUE = "Advanced mode"; //$NON-NLS-1$
+
+}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java
index e1e62c61860..23887ef0489 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLModelWizard.java
@@ -1,5 +1,5 @@
/*****************************************************************************
-on * Copyright (c) 2010, 2013 CEA LIST.
+ * Copyright (c) 2010, 2013 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -51,8 +51,8 @@ public class NewSysMLModelWizard extends CreateModelWizard {
* {@inheritDoc}
*/
@Override
- protected String[] getDiagramCategoryIds() {
- return new String[] { CreateSysMLModelCommand.COMMAND_ID };
+ protected String[] getDiagramCategoryIds() {
+ return new String[]{ CreateSysMLModelCommand.COMMAND_ID };
}
/**
@@ -72,4 +72,9 @@ public class NewSysMLModelWizard extends CreateModelWizard {
// here SysML is the only available category
}
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
+ }
+
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java
index 3994ea393e9..89f70367d29 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui/src/org/eclipse/papyrus/sysml/diagram/ui/NewSysMLProjectWizard.java
@@ -68,8 +68,13 @@ public class NewSysMLProjectWizard extends NewPapyrusProjectWizard {
* {@inheritDoc}
*/
@Override
- protected String[] getDiagramCategoryIds() {
- return new String[] { CreateSysMLModelCommand.COMMAND_ID };
+ protected String[] getDiagramCategoryIds() {
+ return new String[]{ CreateSysMLModelCommand.COMMAND_ID };
+ }
+
+ @Override
+ public boolean isPapyrusRootWizard() {
+ return false;
}
}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi
index b5e243cb09e..13dc72d75c9 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/configuration/BDDconfig.xmi
@@ -15,8 +15,8 @@
editPartQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart"
name="Block based on Class representation of class diagram"
viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.BlockClassifierViewFactory"
- inducedRepresentations="_rC19oNnoEeSqwOe5_frWm6 //@libraries.1/@representations.4 _rC19oNnoEeSqwOe5_frWm7"
- subRepresentations="//@libraries.0/@representations.2"
+ inducedRepresentations="_rC19oNnoEeSqwOe5_frWm6 //@libraries.1/@representations.4 _rC19oNnoEeSqwOe5_frWm7 //@libraries.1/@representations.5 //@libraries.1/@representations.6"
+ subRepresentations="//@libraries.0/@representations.2 //@libraries.0/@representations.4 //@libraries.0/@representations.5 //@libraries.0/@representations.6"
reusedID="2008"/>
</usages>
<libraries
@@ -50,6 +50,45 @@
name="Constraint As Label"
viewFactory="org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory"
graphicalElementType="org.eclipse.papyrus.sysML.Constraint_Label"/>
+ <representations
+ xsi:type="expansionmodel:Representation"
+ name="Class Port"
+ viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.PortViewFactory"
+ graphicalElementType="org.eclipse.papyrus.sysML.Class_Port"
+ inducedRepresentations="//@libraries.1/@representations.3">
+ <kind
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_EoAOIN0DEeSiOexlyH3Ifw"/>
+ </representations>
+ <representations
+ xsi:type="expansionmodel:Representation"
+ name="Class ProxyPort"
+ viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.PortViewFactory"
+ graphicalElementType="org.eclipse.papyrus.sysML.Class_ProxyPort"
+ inducedRepresentations="//@libraries.1/@representations.3">
+ <kind
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_EoAOIN0DEeSiOexlyH3Ifw"/>
+ </representations>
+ <representations
+ xsi:type="expansionmodel:Representation"
+ name="Class FullPort"
+ viewFactory="org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory.PortViewFactory"
+ graphicalElementType="org.eclipse.papyrus.sysML.Class_FullPort"
+ inducedRepresentations="//@libraries.1/@representations.3">
+ <kind
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_EoAOIN0DEeSiOexlyH3Ifw"/>
+ </representations>
+ <representations
+ xsi:type="expansionmodel:Representation"
+ editPartQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyForClassEditPart"
+ name="ProxyPort As Label"
+ viewFactory="org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory"
+ graphicalElementType="org.eclipse.papyrus.sysML.ProxyPort_Label"/>
+ <representations
+ xsi:type="expansionmodel:Representation"
+ editPartQualifiedName="org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PropertyForClassEditPart"
+ name="FullPort As Label"
+ viewFactory="org.eclipse.papyrus.gmf.diagram.common.factory.ShapeViewFactory"
+ graphicalElementType="org.eclipse.papyrus.sysML.FullPort_Label"/>
</libraries>
<libraries
xmi:id="_rC19oNnoEeSqwOe5_frWm5"
@@ -95,7 +134,23 @@
hint="constraints"
children="//@libraries.0/@representations.3">
<kind
- href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/>
- </representations>
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/>
+ </representations>
+ <representations
+ xsi:type="expansionmodel:InducedRepresentation"
+ name="ProxyPort Compartment"
+ hint="Proxy Ports"
+ children="//@libraries.0/@representations.7">
+ <kind
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/>
+ </representations>
+ <representations
+ xsi:type="expansionmodel:InducedRepresentation"
+ name="FullPort Compartment"
+ hint="Full Ports"
+ children="//@libraries.0/@representations.8">
+ <kind
+ href="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/model/UMLRepresentationKind.xmi#_vbTKYN0DEeS-X4lB2Ut-YA"/>
+ </representations>
</libraries>
</expansionmodel:DiagramExpansion>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration
index c58f1998577..bc45b35bcb5 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/resources/palette/blockDiagram.paletteconfiguration
@@ -41,7 +41,7 @@
<ownedConfigurations
xsi:type="paletteconfiguration:ToolConfiguration"
id="org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem"
- label="Create ControlOperator"
+ label="ControlOperator"
description="Create ControlOperator">
<icon
pluginID="org.eclipse.papyrus.sysml"
@@ -184,22 +184,40 @@
</ownedConfigurations>
<ownedConfigurations
xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Port"
+ id="org.eclipse.papyrus.sysML.Class_Port"
label="Port"
description="Create a Port">
<icon
- pluginID="org.eclipse.papyrus.sysml"
- iconPath="icons/requirements/Requirement.gif"/>
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="/icons/full/obj16/Port.gif"/>
<elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/>
+ elementTypeId="org.eclipse.papyrus.sysML.Class_Port"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Class_ProxyPort"
+ label="ProxyPort"
+ description="Create a ProxyPort">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="/icons/full/obj16/Port.gif"/>
<elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/>
+ elementTypeId="org.eclipse.papyrus.sysML.Class_ProxyPort"/>
<elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/>
+ elementTypeId="org.eclipse.papyrus.sysML.ProxyPort_Label"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Class_FullPort"
+ label="FullPort"
+ description="Create a FullPort">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="/icons/full/obj16/Port.gif"/>
<elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/>
+ elementTypeId="org.eclipse.papyrus.sysML.Class_FullPort"/>
<elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/>
+ elementTypeId="org.eclipse.papyrus.sysML.FullPort_Label"/>
</ownedConfigurations>
</drawerConfigurations>
<drawerConfigurations
@@ -266,111 +284,6 @@
kind="ConnectionTool"/>
</drawerConfigurations>
<drawerConfigurations
- id="Deprecated"
- label="Deprecated"
- description="Deprecated">
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_Property"
- label="Property (Deprecated)"
- description="Create a Deprecated Property">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3002"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3005"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3006"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3012"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3018"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3041"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification"
- label="InstanceSpecification (Deprecated)"
- description="Create a Deprecated InstanceSpecification">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/InstanceSpecification.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_Class"
- label="Class (Deprecated)"
- description="Create a Deprecated Class">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_2008"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3004"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3008"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3010"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3014"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_Association"
- label="Association (Deprecated)"
- description="Create a Deprecated Association"
- kind="ConnectionTool">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Association.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_2015"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4001"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4019"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_Generalization"
- label="Generalization (Deprecated)"
- description="Create a Deprecated Generalization"
- kind="ConnectionTool">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="org.eclipse.papyrus.sysML.Deprecated_DataType"
- label="DataType (Deprecated)"
- description="Create a Deprecated DataType">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/DataType.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_2010"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3027"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3043"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3044"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3045"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <drawerConfigurations
id="Nodes"
label="Other Nodes"
description="Other Nodes">
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java
new file mode 100644
index 00000000000..f0dabe89628
--- /dev/null
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.blockdefinition/src/org/eclipse/papyrus/sysml14/diagram/blockdefinition/factory/PortViewFactory.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml14.diagram.blockdefinition.factory;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.core.view.factories.ViewFactory;
+import org.eclipse.gmf.runtime.notation.DecorationNode;
+import org.eclipse.gmf.runtime.notation.Location;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.NotationFactory;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.uml2.uml.Operation;
+
+public class PortViewFactory implements ViewFactory {
+
+ /**
+ * visual ID for stereotype label of border item
+ */
+// protected static final String OPERATION_BORDER_ITEM_STEREOTYPE_LABEL = "Operation_BorderItem_Stereotype_Label";
+ /**
+ * visual ID for name label of border item
+ */
+ protected static final String OPERATION_BORDER_ITEM_LABEL = "Operation_BorderItem_Label";
+ @Override
+ public View createView(IAdaptable semanticAdapter, View containerView, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+ return createPort((EObject)semanticAdapter.getAdapter(EObject.class), containerView,semanticHint, index, persisted, preferencesHint);
+ }
+ public Node createPort(EObject domainElement, View containerView,String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
+
+ Operation o;
+
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(semanticHint);
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Port");
+ Node label5125 = createLabel(node, OPERATION_BORDER_ITEM_LABEL);
+ label5125.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
+ Location location5125 = (Location)label5125.getLayoutConstraint();
+ location5125.setX(25);
+ location5125.setY(3);
+ return node;
+ }
+ protected Node createLabel(View owner, String hint) {
+ DecorationNode rv = NotationFactory.eINSTANCE.createDecorationNode();
+ rv.setType(hint);
+ ViewUtil.insertChildView(owner, rv, ViewUtil.APPEND, true);
+ return rv;
+ }
+
+}
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations
index a4f199857d5..3dea3ff4bd6 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14CompositeStructureDiagram.elementtypesconfigurations
@@ -1,349 +1,822 @@
<?xml version="1.0" encoding="ASCII"?>
-<elementtypesconfigurations:ElementTypeSetConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:applystereotypeadviceconfiguration="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/uml/applystereotypeadvice/1.0" xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0" xmlns:stereotypeapplicationmatcherconfiguration="http://www.eclipse.org/payrus/elementtypesconfigurations/uml/stereotypematcherconfiguration" xmi:id="_Qt9c4Mv4EeS5BpE3hOblyw" name="SysML" identifier="org.eclipse.papyrus.SysML14.elementTypes" metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c4cv4EeS5BpE3hOblyw" name="ValueType (3080)" identifier="org.eclipse.papyrus.SysML14.ValueType_3080" hint="3080">
- <iconEntry xmi:id="_Qt9c4sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+<elementtypesconfigurations:ElementTypeSetConfiguration
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:applystereotypeadviceconfiguration="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/uml/applystereotypeadvice/1.0"
+ xmlns:elementtypesconfigurations="http://www.eclipse.org/papyrus/infra/elementtypesconfigurations/1.0"
+ xmlns:stereotypeapplicationmatcherconfiguration="http://www.eclipse.org/payrus/elementtypesconfigurations/uml/stereotypematcherconfiguration"
+ xmi:id="_Qt9c4Mv4EeS5BpE3hOblyw"
+ name="SysML"
+ identifier="org.eclipse.papyrus.SysML14.elementTypes"
+ metamodelNsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c4cv4EeS5BpE3hOblyw"
+ name="ValueType (3080)"
+ identifier="org.eclipse.papyrus.SysML14.ValueType_3080"
+ hint="3080">
+ <iconEntry
+ xmi:id="_Qt9c4sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ValueType</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_3080</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c48v4EeS5BpE3hOblyw" name="ValueType (2068)" identifier="org.eclipse.papyrus.SysML14.ValueType_2068" hint="2068">
- <iconEntry xmi:id="_Qt9c5Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c48v4EeS5BpE3hOblyw"
+ name="ValueType (2068)"
+ identifier="org.eclipse.papyrus.SysML14.ValueType_2068"
+ hint="2068">
+ <iconEntry
+ xmi:id="_Qt9c5Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/DataType.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ValueType</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_2068</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c5cv4EeS5BpE3hOblyw" name="DistributedProperty (3070)" identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9c5sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c5cv4EeS5BpE3hOblyw"
+ name="DistributedProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9c5sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.DistributedProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c58v4EeS5BpE3hOblyw" name="DistributedProperty (3101)" identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9c6Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c58v4EeS5BpE3hOblyw"
+ name="DistributedProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.DistributedProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9c6Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.DistributedProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c6cv4EeS5BpE3hOblyw" name="ConnectorProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9c6sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c6cv4EeS5BpE3hOblyw"
+ name="ConnectorProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9c6sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ConnectorProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c68v4EeS5BpE3hOblyw" name="ConnectorProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9c7Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c68v4EeS5BpE3hOblyw"
+ name="ConnectorProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9c7Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ConnectorProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c7cv4EeS5BpE3hOblyw" name="ParticipantProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9c7sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c7cv4EeS5BpE3hOblyw"
+ name="ParticipantProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9c7sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ParticipantProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c78v4EeS5BpE3hOblyw" name="ParticipantProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9c8Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c78v4EeS5BpE3hOblyw"
+ name="ParticipantProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9c8Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ParticipantProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c8cv4EeS5BpE3hOblyw" name="BindingConnector" identifier="org.eclipse.papyrus.SysML14.BindingConnector_4013" hint="4013">
- <iconEntry xmi:id="_Qt9c8sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Connector.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c8cv4EeS5BpE3hOblyw"
+ name="BindingConnector"
+ identifier="org.eclipse.papyrus.SysML14.BindingConnector_4013"
+ hint="4013">
+ <iconEntry
+ xmi:id="_Qt9c8sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Connector.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.BindingConnector</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Connector_4013</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c88v4EeS5BpE3hOblyw" name="Block (3085)" identifier="org.eclipse.papyrus.SysML14.Block_3085" hint="3085">
- <iconEntry xmi:id="_Qt9c9Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c88v4EeS5BpE3hOblyw"
+ name="Block (3085)"
+ identifier="org.eclipse.papyrus.SysML14.Block_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9c9Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Block</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c9cv4EeS5BpE3hOblyw" name="Block (2073)" identifier="org.eclipse.papyrus.SysML14.Block_2073" hint="2073">
- <iconEntry xmi:id="_Qt9c9sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c9cv4EeS5BpE3hOblyw"
+ name="Block (2073)"
+ identifier="org.eclipse.papyrus.SysML14.Block_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9c9sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Block</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c98v4EeS5BpE3hOblyw" name="EndPathMultiplicity (3070)" identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070" hint="3070">
- <iconEntry xmi:id="_Qt9c-Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c98v4EeS5BpE3hOblyw"
+ name="EndPathMultiplicity (3070)"
+ identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9c-Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.EndPathMultiplicity</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c-cv4EeS5BpE3hOblyw" name="EndPathMultiplicity (3101)" identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101" hint="3101">
- <iconEntry xmi:id="_Qt9c-sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c-cv4EeS5BpE3hOblyw"
+ name="EndPathMultiplicity (3101)"
+ identifier="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9c-sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.EndPathMultiplicity</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c-8v4EeS5BpE3hOblyw" name="BoundReference (3070)" identifier="org.eclipse.papyrus.SysML14.BoundReference_3070" hint="3070">
- <iconEntry xmi:id="_Qt9c_Mv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c-8v4EeS5BpE3hOblyw"
+ name="BoundReference (3070)"
+ identifier="org.eclipse.papyrus.SysML14.BoundReference_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9c_Mv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.BoundReference</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c_cv4EeS5BpE3hOblyw" name="BoundReference (3101)" identifier="org.eclipse.papyrus.SysML14.BoundReference_3101" hint="3101">
- <iconEntry xmi:id="_Qt9c_sv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c_cv4EeS5BpE3hOblyw"
+ name="BoundReference (3101)"
+ identifier="org.eclipse.papyrus.SysML14.BoundReference_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9c_sv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.BoundReference</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9c_8v4EeS5BpE3hOblyw" name="AdjunctProperty (3070)" identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9dAMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9c_8v4EeS5BpE3hOblyw"
+ name="AdjunctProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9dAMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.AdjunctProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dAcv4EeS5BpE3hOblyw" name="AdjunctProperty (3101)" identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9dAsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dAcv4EeS5BpE3hOblyw"
+ name="AdjunctProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9dAsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.AdjunctProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dA8v4EeS5BpE3hOblyw" name="ClassifierBehaviorProperty (3070)" identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9dBMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dA8v4EeS5BpE3hOblyw"
+ name="ClassifierBehaviorProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9dBMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dBcv4EeS5BpE3hOblyw" name="ClassifierBehaviorProperty (3101)" identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9dBsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dBcv4EeS5BpE3hOblyw"
+ name="ClassifierBehaviorProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9dBsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dB8v4EeS5BpE3hOblyw" name="ItemFlow" identifier="org.eclipse.papyrus.SysML14.ItemFlow_4021" hint="4021">
- <iconEntry xmi:id="_Qt9dCMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/InformationFlow.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dB8v4EeS5BpE3hOblyw"
+ name="ItemFlow"
+ identifier="org.eclipse.papyrus.SysML14.ItemFlow_4021"
+ hint="4021">
+ <iconEntry
+ xmi:id="_Qt9dCMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/InformationFlow.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ItemFlow</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.InformationFlow_4021</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dCcv4EeS5BpE3hOblyw" name="FlowProperty (3070)" identifier="org.eclipse.papyrus.SysML14.FlowProperty_3070" hint="3070">
- <iconEntry xmi:id="_Qt9dCsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dCcv4EeS5BpE3hOblyw"
+ name="FlowProperty (3070)"
+ identifier="org.eclipse.papyrus.SysML14.FlowProperty_3070"
+ hint="3070">
+ <iconEntry
+ xmi:id="_Qt9dCsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FlowProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dC8v4EeS5BpE3hOblyw" name="FlowProperty (3101)" identifier="org.eclipse.papyrus.SysML14.FlowProperty_3101" hint="3101">
- <iconEntry xmi:id="_Qt9dDMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dC8v4EeS5BpE3hOblyw"
+ name="FlowProperty (3101)"
+ identifier="org.eclipse.papyrus.SysML14.FlowProperty_3101"
+ hint="3101">
+ <iconEntry
+ xmi:id="_Qt9dDMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FlowProperty</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dDcv4EeS5BpE3hOblyw" name="FullPort" identifier="org.eclipse.papyrus.SysML14.FullPort_3069" hint="3069">
- <iconEntry xmi:id="_Qt9dDsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dDcv4EeS5BpE3hOblyw"
+ name="FullPort"
+ identifier="org.eclipse.papyrus.SysML14.FullPort_3069"
+ hint="3069">
+ <iconEntry
+ xmi:id="_Qt9dDsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Port.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FullPort</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dD8v4EeS5BpE3hOblyw" name="InterfaceBlock (3085)" identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dEMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dD8v4EeS5BpE3hOblyw"
+ name="InterfaceBlock (3085)"
+ identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9dEMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.InterfaceBlock</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dEcv4EeS5BpE3hOblyw" name="InterfaceBlock (2073)" identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dEsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dEcv4EeS5BpE3hOblyw"
+ name="InterfaceBlock (2073)"
+ identifier="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9dEsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.InterfaceBlock</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dE8v4EeS5BpE3hOblyw" name="ProxyPort" identifier="org.eclipse.papyrus.SysML14.ProxyPort_3069" hint="3069">
- <iconEntry xmi:id="_Qt9dFMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dE8v4EeS5BpE3hOblyw"
+ name="ProxyPort"
+ identifier="org.eclipse.papyrus.SysML14.ProxyPort_3069"
+ hint="3069">
+ <iconEntry
+ xmi:id="_Qt9dFMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Port.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ProxyPort</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dFcv4EeS5BpE3hOblyw" name="ChangeStructuralFeatureEvent" identifier="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088" hint="2088">
- <iconEntry xmi:id="_Qt9dFsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/ChangeEvent.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dFcv4EeS5BpE3hOblyw"
+ name="ChangeStructuralFeatureEvent"
+ identifier="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"
+ hint="2088">
+ <iconEntry
+ xmi:id="_Qt9dFsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/ChangeEvent.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.ChangeEvent_2088</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dF8v4EeS5BpE3hOblyw" name="ControlOperator Operation" identifier="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102" hint="3102">
- <iconEntry xmi:id="_Qt9dGMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dF8v4EeS5BpE3hOblyw"
+ name="ControlOperator Operation"
+ identifier="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"
+ hint="3102">
+ <iconEntry
+ xmi:id="_Qt9dGMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ControlOperator_Operation</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Operation_3102</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dGcv4EeS5BpE3hOblyw" name="Rate Parameter" identifier="org.eclipse.papyrus.SysML14.Rate_Parameter_3088" hint="3088">
- <iconEntry xmi:id="_Qt9dGsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dGcv4EeS5BpE3hOblyw"
+ name="Rate Parameter"
+ identifier="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"
+ hint="3088">
+ <iconEntry
+ xmi:id="_Qt9dGsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Parameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Rate_Parameter</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dG8v4EeS5BpE3hOblyw" name="Discrete Parameter" identifier="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088" hint="3088">
- <iconEntry xmi:id="_Qt9dHMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dG8v4EeS5BpE3hOblyw"
+ name="Discrete Parameter"
+ identifier="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"
+ hint="3088">
+ <iconEntry
+ xmi:id="_Qt9dHMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Parameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Discrete_Parameter</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dHcv4EeS5BpE3hOblyw" name="Continuous Parameter" identifier="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088" hint="3088">
- <iconEntry xmi:id="_Qt9dHsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dHcv4EeS5BpE3hOblyw"
+ name="Continuous Parameter"
+ identifier="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"
+ hint="3088">
+ <iconEntry
+ xmi:id="_Qt9dHsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Parameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Continuous_Parameter</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dH8v4EeS5BpE3hOblyw" name="Optional" identifier="org.eclipse.papyrus.SysML14.Optional_3088" hint="3088">
- <iconEntry xmi:id="_Qt9dIMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Parameter.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dH8v4EeS5BpE3hOblyw"
+ name="Optional"
+ identifier="org.eclipse.papyrus.SysML14.Optional_3088"
+ hint="3088">
+ <iconEntry
+ xmi:id="_Qt9dIMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Parameter.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Optional</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Parameter_3088</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dIcv4EeS5BpE3hOblyw" name="Rationale (3097)" identifier="org.eclipse.papyrus.SysML14.Rationale_3097" hint="3097">
- <iconEntry xmi:id="_Qt9dIsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dIcv4EeS5BpE3hOblyw"
+ name="Rationale (3097)"
+ identifier="org.eclipse.papyrus.SysML14.Rationale_3097"
+ hint="3097">
+ <iconEntry
+ xmi:id="_Qt9dIsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Rationale</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dI8v4EeS5BpE3hOblyw" name="Rationale (2109)" identifier="org.eclipse.papyrus.SysML14.Rationale_2109" hint="2109">
- <iconEntry xmi:id="_Qt9dJMv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dI8v4EeS5BpE3hOblyw"
+ name="Rationale (2109)"
+ identifier="org.eclipse.papyrus.SysML14.Rationale_2109"
+ hint="2109">
+ <iconEntry
+ xmi:id="_Qt9dJMv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Rationale</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dJcv4EeS5BpE3hOblyw" name="View Package" identifier="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure" hint="CompositeStructure">
- <iconEntry xmi:id="_Qt9dJsv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Package.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dJcv4EeS5BpE3hOblyw"
+ name="View Package"
+ identifier="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"
+ hint="CompositeStructure">
+ <iconEntry
+ xmi:id="_Qt9dJsv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Package.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Package_1000</specializedTypesID>
- <matcherConfiguration xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration" xmi:id="_Qt9dJ8v4EeS5BpE3hOblyw">
+ <matcherConfiguration
+ xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
+ xmi:id="_Qt9dJ8v4EeS5BpE3hOblyw">
<stereotypesQualifiedNames>SysML::ModelElements::View</stereotypesQualifiedNames>
</matcherConfiguration>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dKMv4EeS5BpE3hOblyw" name="View (3085)" identifier="org.eclipse.papyrus.SysML14.View_Class_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dKcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dKMv4EeS5BpE3hOblyw"
+ name="View (3085)"
+ identifier="org.eclipse.papyrus.SysML14.View_Class_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9dKcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.View_Class</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dKsv4EeS5BpE3hOblyw" name="View (2073)" identifier="org.eclipse.papyrus.SysML14.View_Class_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dK8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dKsv4EeS5BpE3hOblyw"
+ name="View (2073)"
+ identifier="org.eclipse.papyrus.SysML14.View_Class_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9dK8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.View_Class</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dLMv4EeS5BpE3hOblyw" name="Conform Dependency" identifier="org.eclipse.papyrus.SysML14.Conform_Dependency_4010" hint="4010">
- <iconEntry xmi:id="_Qt9dLcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dLMv4EeS5BpE3hOblyw"
+ name="Conform Dependency"
+ identifier="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"
+ hint="4010">
+ <iconEntry
+ xmi:id="_Qt9dLcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Conform_Dependency</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Dependency_4010</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dLsv4EeS5BpE3hOblyw" name="Conform Generalization" identifier="org.eclipse.papyrus.SysML14.Conform_Generalization_4015" hint="4015">
- <iconEntry xmi:id="_Qt9dL8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dLsv4EeS5BpE3hOblyw"
+ name="Conform Generalization"
+ identifier="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"
+ hint="4015">
+ <iconEntry
+ xmi:id="_Qt9dL8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Generalization.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Conform_Generalization</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Generalization_4015</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dMMv4EeS5BpE3hOblyw" name="Problem (3097)" identifier="org.eclipse.papyrus.SysML14.Problem_3097" hint="3097">
- <iconEntry xmi:id="_Qt9dMcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dMMv4EeS5BpE3hOblyw"
+ name="Problem (3097)"
+ identifier="org.eclipse.papyrus.SysML14.Problem_3097"
+ hint="3097">
+ <iconEntry
+ xmi:id="_Qt9dMcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Problem</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dMsv4EeS5BpE3hOblyw" name="Problem (2109)" identifier="org.eclipse.papyrus.SysML14.Problem_2109" hint="2109">
- <iconEntry xmi:id="_Qt9dM8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dMsv4EeS5BpE3hOblyw"
+ name="Problem (2109)"
+ identifier="org.eclipse.papyrus.SysML14.Problem_2109"
+ hint="2109">
+ <iconEntry
+ xmi:id="_Qt9dM8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Problem</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dNMv4EeS5BpE3hOblyw" name="ViewPoint (3085)" identifier="org.eclipse.papyrus.SysML14.ViewPoint_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dNcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dNMv4EeS5BpE3hOblyw"
+ name="ViewPoint (3085)"
+ identifier="org.eclipse.papyrus.SysML14.ViewPoint_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9dNcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ViewPoint</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dNsv4EeS5BpE3hOblyw" name="ViewPoint (2073)" identifier="org.eclipse.papyrus.SysML14.ViewPoint_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dN8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dNsv4EeS5BpE3hOblyw"
+ name="ViewPoint (2073)"
+ identifier="org.eclipse.papyrus.SysML14.ViewPoint_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9dN8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ViewPoint</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dOMv4EeS5BpE3hOblyw" name="Expose" identifier="org.eclipse.papyrus.SysML14.Expose_4010" hint="4010">
- <iconEntry xmi:id="_Qt9dOcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Dependency.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dOMv4EeS5BpE3hOblyw"
+ name="Expose"
+ identifier="org.eclipse.papyrus.SysML14.Expose_4010"
+ hint="4010">
+ <iconEntry
+ xmi:id="_Qt9dOcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Dependency.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Expose</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Dependency_4010</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dOsv4EeS5BpE3hOblyw" name="ElementGroup (3097)" identifier="org.eclipse.papyrus.SysML14.ElementGroup_3097" hint="3097">
- <iconEntry xmi:id="_Qt9dO8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dOsv4EeS5BpE3hOblyw"
+ name="ElementGroup (3097)"
+ identifier="org.eclipse.papyrus.SysML14.ElementGroup_3097"
+ hint="3097">
+ <iconEntry
+ xmi:id="_Qt9dO8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ElementGroup</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_3097</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dPMv4EeS5BpE3hOblyw" name="ElementGroup (2109)" identifier="org.eclipse.papyrus.SysML14.ElementGroup_2109" hint="2109">
- <iconEntry xmi:id="_Qt9dPcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Comment.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dPMv4EeS5BpE3hOblyw"
+ name="ElementGroup (2109)"
+ identifier="org.eclipse.papyrus.SysML14.ElementGroup_2109"
+ hint="2109">
+ <iconEntry
+ xmi:id="_Qt9dPcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Comment.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ElementGroup</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Comment_2109</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dPsv4EeS5BpE3hOblyw" name="ConstraintBlock (3085)" identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dP8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dPsv4EeS5BpE3hOblyw"
+ name="ConstraintBlock (3085)"
+ identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9dP8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ConstraintBlock</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dQMv4EeS5BpE3hOblyw" name="ConstraintBlock (2073)" identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dQcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dQMv4EeS5BpE3hOblyw"
+ name="ConstraintBlock (2073)"
+ identifier="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9dQcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.ConstraintBlock</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dQsv4EeS5BpE3hOblyw" name="Allocate Abstraction" identifier="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dQ8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dQsv4EeS5BpE3hOblyw"
+ name="Allocate Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dQ8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Allocate_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dRMv4EeS5BpE3hOblyw" name="DeriveReqt Abstraction" identifier="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dRcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dRMv4EeS5BpE3hOblyw"
+ name="DeriveReqt Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dRcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dRsv4EeS5BpE3hOblyw" name="Copy Abstraction" identifier="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dR8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dRsv4EeS5BpE3hOblyw"
+ name="Copy Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dR8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Copy_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dSMv4EeS5BpE3hOblyw" name="Satisfy Abstraction" identifier="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dScv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dSMv4EeS5BpE3hOblyw"
+ name="Satisfy Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dScv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Satisfy_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dSsv4EeS5BpE3hOblyw" name="TestCase Operation" identifier="org.eclipse.papyrus.SysML14.TestCase_Operation_3102" hint="3102">
- <iconEntry xmi:id="_Qt9dS8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Operation.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dSsv4EeS5BpE3hOblyw"
+ name="TestCase Operation"
+ identifier="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"
+ hint="3102">
+ <iconEntry
+ xmi:id="_Qt9dS8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Operation.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.TestCase_Operation</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Operation_3102</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dTMv4EeS5BpE3hOblyw" name="Requirement (3085)" identifier="org.eclipse.papyrus.SysML14.Requirement_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dTcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dTMv4EeS5BpE3hOblyw"
+ name="Requirement (3085)"
+ identifier="org.eclipse.papyrus.SysML14.Requirement_3085"
+ hint="3085">
+ <iconEntry
+ xmi:id="_Qt9dTcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Requirement</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dTsv4EeS5BpE3hOblyw" name="Requirement (2073)" identifier="org.eclipse.papyrus.SysML14.Requirement_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dT8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dTsv4EeS5BpE3hOblyw"
+ name="Requirement (2073)"
+ identifier="org.eclipse.papyrus.SysML14.Requirement_2073"
+ hint="2073">
+ <iconEntry
+ xmi:id="_Qt9dT8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Class.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Requirement</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dUMv4EeS5BpE3hOblyw" name="Verify Abstraction" identifier="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dUcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dUMv4EeS5BpE3hOblyw"
+ name="Verify Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dUcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Verify_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dUsv4EeS5BpE3hOblyw" name="Trace Abstraction" identifier="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dU8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dUsv4EeS5BpE3hOblyw"
+ name="Trace Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dU8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Trace_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dVMv4EeS5BpE3hOblyw" name="Refine Abstraction" identifier="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007" hint="4007">
- <iconEntry xmi:id="_Qt9dVcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Abstraction.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dVMv4EeS5BpE3hOblyw"
+ name="Refine Abstraction"
+ identifier="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"
+ hint="4007">
+ <iconEntry
+ xmi:id="_Qt9dVcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Abstraction.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.Refine_Abstraction</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Abstraction_4007</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dVsv4EeS5BpE3hOblyw" name="FlowPort" identifier="org.eclipse.papyrus.SysML14.FlowPort_3069" hint="3069">
- <iconEntry xmi:id="_Qt9dV8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Port.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dVsv4EeS5BpE3hOblyw"
+ name="FlowPort"
+ identifier="org.eclipse.papyrus.SysML14.FlowPort_3069"
+ hint="3069">
+ <iconEntry
+ xmi:id="_Qt9dV8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Port.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FlowPort</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Port_3069</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dWMv4EeS5BpE3hOblyw" name="FlowSpecification (3087)" identifier="org.eclipse.papyrus.SysML14.FlowSpecification_3087" hint="3087">
- <iconEntry xmi:id="_Qt9dWcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dWMv4EeS5BpE3hOblyw"
+ name="FlowSpecification (3087)"
+ identifier="org.eclipse.papyrus.SysML14.FlowSpecification_3087"
+ hint="3087">
+ <iconEntry
+ xmi:id="_Qt9dWcv4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FlowSpecification</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Interface_3087</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dWsv4EeS5BpE3hOblyw" name="FlowSpecification (2076)" identifier="org.eclipse.papyrus.SysML14.FlowSpecification_2076" hint="2076">
- <iconEntry xmi:id="_Qt9dW8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Interface.gif" bundleId="org.eclipse.uml2.uml.edit"/>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_Qt9dWsv4EeS5BpE3hOblyw"
+ name="FlowSpecification (2076)"
+ identifier="org.eclipse.papyrus.SysML14.FlowSpecification_2076"
+ hint="2076">
+ <iconEntry
+ xmi:id="_Qt9dW8v4EeS5BpE3hOblyw"
+ iconPath="/icons/full/obj16/Interface.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
<specializedTypesID>org.eclipse.papyrus.SysML14.FlowSpecification</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Interface_2076</specializedTypesID>
</elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dXMv4EeS5BpE3hOblyw" name="Deprecated (3070)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Property_3070" hint="3070">
- <iconEntry xmi:id="_Qt9dXcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3070</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dXsv4EeS5BpE3hOblyw" name="Deprecated (3101)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Property_3101" hint="3101">
- <iconEntry xmi:id="_Qt9dX8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Property.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Property_3101</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dYMv4EeS5BpE3hOblyw" name="Deprecated (3085)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Class_3085" hint="3085">
- <iconEntry xmi:id="_Qt9dYcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_3085</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dYsv4EeS5BpE3hOblyw" name="Deprecated (2073)" identifier="org.eclipse.papyrus.SysML14.Deprecated_Class_2073" hint="2073">
- <iconEntry xmi:id="_Qt9dY8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Class.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Class_2073</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dZMv4EeS5BpE3hOblyw" name="Deprecated Generalization" identifier="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015" hint="4015">
- <iconEntry xmi:id="_Qt9dZcv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/Generalization.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Generalization</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.Generalization_4015</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9dZsv4EeS5BpE3hOblyw" name="Deprecated (3080)" identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080" hint="3080">
- <iconEntry xmi:id="_Qt9dZ8v4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_3080</specializedTypesID>
- </elementTypeConfigurations>
- <elementTypeConfigurations xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration" xmi:id="_Qt9daMv4EeS5BpE3hOblyw" name="Deprecated (2068)" identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068" hint="2068">
- <iconEntry xmi:id="_Qt9dacv4EeS5BpE3hOblyw" iconPath="/icons/full/obj16/DataType.gif" bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.composite.DataType_2068</specializedTypesID>
- </elementTypeConfigurations>
- <adviceBindingsConfigurations xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration" xmi:id="_Qt9dasv4EeS5BpE3hOblyw" name="Apply View" identifier="org.eclipse.papyrus.SysML14.view_CompositeStructure" target="_Qt9dJcv4EeS5BpE3hOblyw">
- <stereotypesToApply xmi:id="_Qt9da8v4EeS5BpE3hOblyw" stereotypeQualifiedName="SysML::ModelElements::View" updateName="true">
+ <adviceBindingsConfigurations
+ xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
+ xmi:id="_Qt9dasv4EeS5BpE3hOblyw"
+ name="Apply View"
+ identifier="org.eclipse.papyrus.SysML14.view_CompositeStructure"
+ target="_Qt9dJcv4EeS5BpE3hOblyw">
+ <stereotypesToApply
+ xmi:id="_Qt9da8v4EeS5BpE3hOblyw"
+ stereotypeQualifiedName="SysML::ModelElements::View"
+ updateName="true">
<requiredProfiles>SysML</requiredProfiles>
</stereotypesToApply>
</adviceBindingsConfigurations>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations
index c49d0848832..e369a13ef40 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.common/resources/SysML14UMLClassDiagram.elementtypesconfigurations
@@ -2260,420 +2260,6 @@
</elementTypeConfigurations>
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYdcJQEeSX9MoKMBV5Gw"
- name="Deprecated (3002)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3002"
- hint="3002">
- <iconEntry
- xmi:id="_LoKYdsJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3002</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYd8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYeMJQEeSX9MoKMBV5Gw"
- name="Deprecated (3005)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3005"
- hint="3005">
- <iconEntry
- xmi:id="_LoKYecJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3005</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYesJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYe8JQEeSX9MoKMBV5Gw"
- name="Deprecated (3006)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3006"
- hint="3006">
- <iconEntry
- xmi:id="_LoKYfMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3006</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYfcJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYfsJQEeSX9MoKMBV5Gw"
- name="Deprecated (3012)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3012"
- hint="3012">
- <iconEntry
- xmi:id="_LoKYf8JQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3012</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYgMJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYgcJQEeSX9MoKMBV5Gw"
- name="Deprecated (3018)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3018"
- hint="3018">
- <iconEntry
- xmi:id="_LoKYgsJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3018</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYg8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYhMJQEeSX9MoKMBV5Gw"
- name="Deprecated (3041)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Property_3041"
- hint="3041">
- <iconEntry
- xmi:id="_LoKYhcJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Property</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Property_3041</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYhsJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYh8JQEeSX9MoKMBV5Gw"
- name="Deprecated (4021)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021"
- hint="4021">
- <iconEntry
- xmi:id="_LoKYiMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/InstanceSpecification.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYicJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYisJQEeSX9MoKMBV5Gw"
- name="Deprecated (2001)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"
- hint="2001">
- <iconEntry
- xmi:id="_LoKYi8JQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/InstanceSpecification.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_2001</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYjMJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYjcJQEeSX9MoKMBV5Gw"
- name="Deprecated (3020)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"
- hint="3020">
- <iconEntry
- xmi:id="_LoKYjsJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/InstanceSpecification.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecification_3020</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYj8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYkMJQEeSX9MoKMBV5Gw"
- name="Deprecated (2008)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Class_2008"
- hint="2008">
- <iconEntry
- xmi:id="_LoKYkcJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_2008</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYksJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYk8JQEeSX9MoKMBV5Gw"
- name="Deprecated (3004)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3004"
- hint="3004">
- <iconEntry
- xmi:id="_LoKYlMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3004</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYlcJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYlsJQEeSX9MoKMBV5Gw"
- name="Deprecated (3008)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3008"
- hint="3008">
- <iconEntry
- xmi:id="_LoKYl8JQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3008</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYmMJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYmcJQEeSX9MoKMBV5Gw"
- name="Deprecated (3010)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3010"
- hint="3010">
- <iconEntry
- xmi:id="_LoKYmsJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3010</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYm8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYnMJQEeSX9MoKMBV5Gw"
- name="Deprecated (3014)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Class_3014"
- hint="3014">
- <iconEntry
- xmi:id="_LoKYncJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Class</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Class_3014</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYnsJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYn8JQEeSX9MoKMBV5Gw"
- name="Deprecated (2015)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Association_2015"
- hint="2015">
- <iconEntry
- xmi:id="_LoKYoMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Association.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_2015</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYocJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYosJQEeSX9MoKMBV5Gw"
- name="Deprecated (4001)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Association_4001"
- hint="4001">
- <iconEntry
- xmi:id="_LoKYo8JQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Association.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4001</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYpMJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYpcJQEeSX9MoKMBV5Gw"
- name="Deprecated (4019)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Association_4019"
- hint="4019">
- <iconEntry
- xmi:id="_LoKYpsJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Association.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Association</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4019</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYp8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYqMJQEeSX9MoKMBV5Gw"
- name="Deprecated Generalization"
- identifier="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"
- hint="4002">
- <iconEntry
- xmi:id="_LoKYqcJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/Generalization.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_Generalization</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYqsJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYq8JQEeSX9MoKMBV5Gw"
- name="Deprecated (2010)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_2010"
- hint="2010">
- <iconEntry
- xmi:id="_LoKYrMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_2010</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYrcJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYrsJQEeSX9MoKMBV5Gw"
- name="Deprecated (3027)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3027"
- hint="3027">
- <iconEntry
- xmi:id="_LoKYr8JQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3027</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYsMJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYscJQEeSX9MoKMBV5Gw"
- name="Deprecated (3043)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3043"
- hint="3043">
- <iconEntry
- xmi:id="_LoKYssJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3043</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYs8JQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYtMJQEeSX9MoKMBV5Gw"
- name="Deprecated (3044)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3044"
- hint="3044">
- <iconEntry
- xmi:id="_LoKYtcJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3044</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYtsJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_LoKYt8JQEeSX9MoKMBV5Gw"
- name="Deprecated (3045)"
- identifier="org.eclipse.papyrus.sysML.Deprecated_DataType_3045"
- hint="3045">
- <iconEntry
- xmi:id="_LoKYuMJQEeSX9MoKMBV5Gw"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.SysML14.Deprecated_DataType</specializedTypesID>
- <specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.DataType_3045</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_LoKYucJQEeSX9MoKMBV5Gw">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_tjVDYM1xEeSsRbN4ihgqDg"
name="FlowPort (FlowPort_Label)"
description=""
@@ -2854,7 +2440,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_7fjysOgVEeSUQvXhEVQh8w"
- name="Unit"
+ name="Unit_2001"
description="Create an Unit in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.Unit_2001"
hint="2001">
@@ -2864,7 +2450,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_v7PJAOgXEeSUQvXhEVQh8w"
- name="Unit"
+ name="Unit_3020"
description="Create an Unit in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.Unit_3020"
hint="3020">
@@ -2874,7 +2460,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_zWOO4OgnEeSUQvXhEVQh8w"
- name="Unit"
+ name="QuantityKind_2001"
description="Create an QuantityKind in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.QuantityKind_2001"
hint="2001">
@@ -2884,7 +2470,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_zWOO4egnEeSUQvXhEVQh8w"
- name="Unit"
+ name="QuantityKind_3020"
description="Create an QuantityKind in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.QuantityKind_3020"
hint="3020">
@@ -2894,7 +2480,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_X7E5oOgtEeSUQvXhEVQh8w"
- name="PartAssociation"
+ name="PartAssociation_2015"
description="Create an Part Association in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.PartAssociation_2015"
hint="2015">
@@ -2904,7 +2490,7 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_nJF78OgtEeSUQvXhEVQh8w"
- name="PartAssociation"
+ name="PartAssociation_4001"
description="Create an Part Association in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.PartAssociation_4001"
hint="4001">
@@ -2914,11 +2500,76 @@
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_oAQ0gOgtEeSUQvXhEVQh8w"
- name="PartAssociation"
+ name="PartAssociation_4019"
description="Create an Part Association in a UML Class Diagram"
identifier="org.eclipse.papyrus.sysML.PartAssociation_4019"
hint="4019">
<specializedTypesID>org.eclipse.papyrus.SysML14.PartAssociation</specializedTypesID>
<specializedTypesID>org.eclipse.papyrus.uml.diagram.clazz.Association_4019</specializedTypesID>
</elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_gdLMgOmsEeSrzJhCjczRog"
+ name="Class_Port"
+ description="Create an UML Port in an UML Class Diagram"
+ identifier="org.eclipse.papyrus.sysML.Class_Port"
+ hint="Class_Port">
+ <specializedTypesID>org.eclipse.papyrus.uml.Port</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_UZmuEOqKEeSrzJhCjczRog"
+ name="Class_ProxyPort"
+ description="Create an UML ProxyPort in an UML Class Diagram"
+ identifier="org.eclipse.papyrus.sysML.Class_ProxyPort"
+ hint="Class_ProxyPort">
+ <specializedTypesID>org.eclipse.papyrus.SysML14.ProxyPort</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_U54woOqKEeSrzJhCjczRog"
+ name="Class_FullPort"
+ description="Create an UML FullPort in an UML Class Diagram"
+ identifier="org.eclipse.papyrus.sysML.Class_FullPort"
+ hint="Class_FullPort">
+ <specializedTypesID>org.eclipse.papyrus.SysML14.FullPort</specializedTypesID>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_0su20OyxEeSNB9Q0D5gJiA"
+ name="ProxyPort (ProxyPort_Label)"
+ description=""
+ identifier="org.eclipse.papyrus.sysML.ProxyPort_Label"
+ hint="ProxyPort_Label">
+ <iconEntry
+ xmi:id="_0su20eyxEeSNB9Q0D5gJiA"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.SysML14.ProxyPort</specializedTypesID>
+ <matcherConfiguration
+ xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
+ xmi:id="_0su20uyxEeSNB9Q0D5gJiA"
+ matcherClassName="">
+ <stereotypesQualifiedNames>SysML::DeprecatedElements::FlowPort</stereotypesQualifiedNames>
+ </matcherConfiguration>
+ </elementTypeConfigurations>
+ <elementTypeConfigurations
+ xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
+ xmi:id="_1HdD8OyxEeSNB9Q0D5gJiA"
+ name="FullPort (FullPort_Label)"
+ description=""
+ identifier="org.eclipse.papyrus.sysML.FullPort_Label"
+ hint="FullPort_Label">
+ <iconEntry
+ xmi:id="_1HdD8eyxEeSNB9Q0D5gJiA"
+ iconPath="/icons/full/obj16/Property.gif"
+ bundleId="org.eclipse.uml2.uml.edit"/>
+ <specializedTypesID>org.eclipse.papyrus.SysML14.FullPort</specializedTypesID>
+ <matcherConfiguration
+ xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
+ xmi:id="_1HdD8uyxEeSNB9Q0D5gJiA"
+ matcherClassName="">
+ <stereotypesQualifiedNames>SysML::DeprecatedElements::FlowPort</stereotypesQualifiedNames>
+ </matcherConfiguration>
+ </elementTypeConfigurations>
</elementtypesconfigurations:ElementTypeSetConfiguration>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration
index 3a04237eb18..7d4a10a3b02 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.internalblock/resources/palette/internalBlockDiagram.paletteconfiguration
@@ -65,62 +65,6 @@
</ownedConfigurations>
</drawerConfigurations>
<drawerConfigurations
- id="Deprecated"
- label="Deprecated"
- description="Deprecated">
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="palettemodel.Deprecated_DataType"
- label="Deprecated_DataType"
- description="Create a Deprecated">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/DataType.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="palettemodel.Deprecated Generalization"
- label="Deprecated Generalization"
- description="Create a Deprecated Generalization"
- kind="ConnectionTool">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="palettemodel.Deprecated.property"
- label="Deprecated_Property"
- description="Create a Deprecated Property">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3070"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3101"/>
- </ownedConfigurations>
- <ownedConfigurations
- xsi:type="paletteconfiguration:ToolConfiguration"
- id="palettemodel.Deprecated_Class"
- label="Deprecated_Class"
- description="Create a Deprecated_Class">
- <icon
- pluginID="org.eclipse.uml2.uml.edit"
- iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_3085"/>
- <elementDescriptors
- elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_2073"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <drawerConfigurations
id="SysML Nodes"
label="Other Nodes"
description="Other Nodes">
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration
index 4d079d3bc78..488e5cfa606 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.parametric/resources/palette/parametricDiagramPalette.paletteconfiguration
@@ -1,235 +1,580 @@
<?xml version="1.0" encoding="ASCII"?>
-<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="palettemodel" label="SysML">
- <drawerConfigurations id="palette.sysml.parametric.nodes" label="Nodes" description="Nodes">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Comment" label="Comment" description="Create a comment">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Constraint" label="Constraint" description="Create a constraint">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Constraint.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/>
+<paletteconfiguration:PaletteConfiguration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
+ id="palettemodel"
+ label="SysML">
+ <drawerConfigurations
+ id="palette.sysml.parametric.nodes"
+ label="Nodes"
+ description="Nodes">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Comment"
+ label="Comment"
+ description="Create a comment">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Comment.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_2109"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Comment_3097"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Constraint"
+ label="Constraint"
+ description="Create a constraint">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Constraint.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_3120"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.composite.Constraint_2114"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="palette.sysml.parametric.edges" label="Edges" description="Edges">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Dependency" label="Dependency" description="Create a dependency" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="/icons/full/obj16/Dependency.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"/>
+ <drawerConfigurations
+ id="palette.sysml.parametric.edges"
+ label="Edges"
+ description="Edges">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Dependency"
+ label="Dependency"
+ description="Create a dependency"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="/icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="Deprecated" label="Deprecated" description="Deprecated">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_DataType" label="Deprecated_DataType" description="Create a Deprecated">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/DataType.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_2068"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_DataType_3080"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated Generalization" label="Deprecated Generalization" description="Create a Deprecated Generalization" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated.property" label="Deprecated_Property" description="Create a Deprecated Property">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Property_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Deprecated_Class" label="Deprecated_Class" description="Create a Deprecated_Class">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Deprecated_Class_2073"/>
+ <drawerConfigurations
+ id="SysML Nodes"
+ label="Other Nodes"
+ description="Other Nodes">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ClassifierBehaviorProperty"
+ label="ClassifierBehaviorProperty"
+ description="Create a ClassifierBehaviorProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.DistributedProperty"
+ label="DistributedProperty"
+ description="Create a DistributedProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ConnectorProperty"
+ label="ConnectorProperty"
+ description="Create a ConnectorProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ParticipantProperty"
+ label="ParticipantProperty"
+ description="Create a ParticipantProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.FlowProperty"
+ label="FlowProperty"
+ description="Create a FlowProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Block"
+ label="Block"
+ description="Create a Block">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/blocks/Block.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ValueType"
+ label="ValueType"
+ description="Create a ValueType">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/blocks/ValueType.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ConstraintBlock"
+ label="ConstraintBlock"
+ description="Create a ConstraintBlock">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/constraints/ConstraintBlock.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Requirement"
+ label="Requirement"
+ description="Create a Requirement">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Requirement.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Problem"
+ label="Problem"
+ description="Create a Problem">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/modelelements/Problem.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.FlowSpecification"
+ label="FlowSpecification"
+ description="Create a FlowSpecification">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Interface.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ViewPoint"
+ label="ViewPoint"
+ description="Create a ViewPoint">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml.edit"
+ iconPath="icons/full/obj16/ViewPoint.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.TestCase Operation"
+ label="TestCase Operation"
+ description="Create a TestCase Operation">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Operation.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ControlOperator Operation"
+ label="ControlOperator Operation"
+ description="Create a ControlOperator Operation">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Operation.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Rationale"
+ label="Rationale"
+ description="Create a Rationale">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/modelelements/Rationale.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.View_Class"
+ label="View"
+ description="Create a View">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Class.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.View Package"
+ label="View Package"
+ description="Create a View Package">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Package.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.InterfaceBlock "
+ label="InterfaceBlock"
+ description="Create a InterfaceBlock">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Class.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.AdjunctProperty"
+ label="AdjunctProperty"
+ description="Create a AdjunctProperty ">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.FlowPort"
+ label="FlowPort"
+ description="Create a FlowPort">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/portandflows/FlowPort.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.EndPathMultiplicity "
+ label="EndPathMultiplicity"
+ description="Create a EndPathMultiplicity">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Rate Parameter"
+ label="Rate Parameter"
+ description="Create a Rate Parameter">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Parameter.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Discrete Parameter"
+ label="Discrete Parameter"
+ description="Create a Discrete Parameter">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Parameter.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Continuous Parameter"
+ label="Continuous Parameter"
+ description="Create a Continuous Parameter">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Parameter.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ChangeStructuralFeatureEvent"
+ label="ChangeStructuralFeatureEvent"
+ description="Create a ChangeStructuralFeatureEvent">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/ChangeEvent.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ElementGroup"
+ label="ElementGroup"
+ description="Create a ElementGroup">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Comment.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Optional"
+ label="Optional"
+ description="Create a Optional">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Parameter.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.FullPort"
+ label="FullPort"
+ description="Create a FullPort">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Port.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ProxyPort"
+ label="ProxyPort"
+ description="Create a ProxyPort">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Port.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.BoundReference"
+ label="BoundReference"
+ description="Create a BoundReference">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="SysML Nodes" label="Other Nodes" description="Other Nodes">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ClassifierBehaviorProperty" label="ClassifierBehaviorProperty" description="Create a ClassifierBehaviorProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DistributedProperty" label="DistributedProperty" description="Create a DistributedProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DistributedProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConnectorProperty" label="ConnectorProperty" description="Create a ConnectorProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConnectorProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ParticipantProperty" label="ParticipantProperty" description="Create a ParticipantProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ParticipantProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowProperty" label="FlowProperty" description="Create a FlowProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Block" label="Block" description="Create a Block">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/Block.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Block_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ValueType" label="ValueType" description="Create a ValueType">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/ValueType.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_3080"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ValueType_2068"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ConstraintBlock" label="ConstraintBlock" description="Create a ConstraintBlock">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/constraints/ConstraintBlock.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ConstraintBlock_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Requirement" label="Requirement" description="Create a Requirement">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Requirement.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Requirement_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Problem" label="Problem" description="Create a Problem">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Problem.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_3097"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Problem_2109"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowSpecification" label="FlowSpecification" description="Create a FlowSpecification">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Interface.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_3087"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowSpecification_2076"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ViewPoint" label="ViewPoint" description="Create a ViewPoint">
- <icon pluginID="org.eclipse.papyrus.sysml.edit" iconPath="icons/full/obj16/ViewPoint.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ViewPoint_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.TestCase Operation" label="TestCase Operation" description="Create a TestCase Operation">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.TestCase_Operation_3102"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ControlOperator Operation" label="ControlOperator Operation" description="Create a ControlOperator Operation">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rationale" label="Rationale" description="Create a Rationale">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Rationale.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_3097"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rationale_2109"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View_Class" label="View" description="Create a View">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Class_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.View Package" label="View Package" description="Create a View Package">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.InterfaceBlock " label="InterfaceBlock" description="Create a InterfaceBlock">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_3085"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.InterfaceBlock_2073"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.AdjunctProperty" label="AdjunctProperty" description="Create a AdjunctProperty ">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.AdjunctProperty_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FlowPort" label="FlowPort" description="Create a FlowPort">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/FlowPort.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FlowPort_3069"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.EndPathMultiplicity " label="EndPathMultiplicity" description="Create a EndPathMultiplicity">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Rate Parameter" label="Rate Parameter" description="Create a Rate Parameter">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Rate_Parameter_3088"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Discrete Parameter" label="Discrete Parameter" description="Create a Discrete Parameter">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Continuous Parameter" label="Continuous Parameter" description="Create a Continuous Parameter">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ChangeStructuralFeatureEvent" label="ChangeStructuralFeatureEvent" description="Create a ChangeStructuralFeatureEvent">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/ChangeEvent.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ElementGroup" label="ElementGroup" description="Create a ElementGroup">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_3097"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ElementGroup_2109"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Optional" label="Optional" description="Create a Optional">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Parameter.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Optional_3088"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.FullPort" label="FullPort" description="Create a FullPort">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.FullPort_3069"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ProxyPort" label="ProxyPort" description="Create a ProxyPort">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Port.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ProxyPort_3069"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BoundReference" label="BoundReference" description="Create a BoundReference">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3070"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BoundReference_3101"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <drawerConfigurations id="SysML Edges" label="Other Edges" description="Other Edges">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Expose" label="Expose" description="Create a Expose" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Copy Abstraction" label="Copy Abstraction" description="Create a Copy Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Copy.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Verify Abstraction" label="Verify Abstraction" description="Create a Verify Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Verify.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Trace Abstraction" label="Trace Abstraction" description="Create a Trace Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Dependency" label="Conform Dependency" description="Create a Conform Dependency" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Conform Generalization" label="Conform Generalization" description="Create a Conform Generalization" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Refine Abstraction" label="Refine Abstraction" description="Create a Refine Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Allocate Abstraction" label="Allocate Abstraction" description="Create a Allocate Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.DeriveReqt Abstraction" label="DeriveReqt Abstraction" description="Create a DeriveReqt Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.Satisfy Abstraction" label="Satisfy Abstraction" description="Create a Satisfy Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Satisfy.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.ItemFlow" label="ItemFlow" description="Create a ItemFlow" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/ItemFlow.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="palettemodel.BindingConnector" label="BindingConnector" description="Create a BindingConnector">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Connector.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/>
+ <drawerConfigurations
+ id="SysML Edges"
+ label="Other Edges"
+ description="Other Edges">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Expose"
+ label="Expose"
+ description="Create a Expose"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Expose_4010"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Copy Abstraction"
+ label="Copy Abstraction"
+ description="Create a Copy Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Copy.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Verify Abstraction"
+ label="Verify Abstraction"
+ description="Create a Verify Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Verify.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Trace Abstraction"
+ label="Trace Abstraction"
+ description="Create a Trace Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Conform Dependency"
+ label="Conform Dependency"
+ description="Create a Conform Dependency"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Conform_Dependency_4010"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Conform Generalization"
+ label="Conform Generalization"
+ description="Create a Conform Generalization"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Generalization.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Conform_Generalization_4015"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Refine Abstraction"
+ label="Refine Abstraction"
+ description="Create a Refine Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Allocate Abstraction"
+ label="Allocate Abstraction"
+ description="Create a Allocate Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.DeriveReqt Abstraction"
+ label="DeriveReqt Abstraction"
+ description="Create a DeriveReqt Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.Satisfy Abstraction"
+ label="Satisfy Abstraction"
+ description="Create a Satisfy Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Satisfy.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.ItemFlow"
+ label="ItemFlow"
+ description="Create a ItemFlow"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/portandflows/ItemFlow.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.ItemFlow_4021"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="palettemodel.BindingConnector"
+ label="BindingConnector"
+ description="Create a BindingConnector">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Connector.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.SysML14.BindingConnector_4013"/>
</ownedConfigurations>
</drawerConfigurations>
</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration
index 98459667e42..e9bc06562e4 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.diagram.requirement/resources/palette/requirementDiagram.paletteconfiguration
@@ -1,294 +1,630 @@
<?xml version="1.0" encoding="ASCII"?>
-<paletteconfiguration:PaletteConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7" id="palettemodel" label="SysML">
- <drawerConfigurations id="palette.sysml.requirement.nodes" label="Nodes" description="Nodes">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Package" label="Package" description="Create a package">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Requirement" label="Requirement" description="Create a Requirement">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Requirement.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Problem" label="Problem" description="Create a Problem">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Problem.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Problem_2012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Problem_3028"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Rationale" label="Rationale" description="Create a Rationale">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/modelelements/Rationale.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Rationale_2012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Rationale_3028"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.TestCase_Operation" label="TestCase" description="Create a TestCase">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3003"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3007"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3013"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3019"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3042"/>
+<paletteconfiguration:PaletteConfiguration
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:paletteconfiguration="http://www.eclipse.org/papyrus/diagram/paletteconfiguration/0.7"
+ id="palettemodel"
+ label="SysML">
+ <drawerConfigurations
+ id="palette.sysml.requirement.nodes"
+ label="Nodes"
+ description="Nodes">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Package"
+ label="Package"
+ description="Create a package">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Package.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_2007"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Package_3009"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Requirement"
+ label="Requirement"
+ description="Create a Requirement">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Requirement.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Requirement_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Requirement_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Requirement_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Requirement_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Requirement_3014"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Problem"
+ label="Problem"
+ description="Create a Problem">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/modelelements/Problem.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Problem_2012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Problem_3028"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Rationale"
+ label="Rationale"
+ description="Create a Rationale">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/modelelements/Rationale.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Rationale_2012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Rationale_3028"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.TestCase_Operation"
+ label="TestCase"
+ description="Create a TestCase">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Operation.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3003"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3007"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3013"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3019"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.TestCase_Operation_3042"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="palette.sysml.requirement.edges" label="Edges" description="Edges">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Copy_Abstraction" label="Copy" description="Create a Copy" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Copy.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Copy_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction" label="DeriveReqt" description="Create a DeriveReqt Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Satisfy_Abstraction" label="Satisfy" description="Create a Satisfy" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Satisfy.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Verify_Abstraction" label="Verify" description="Create a Verify">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/requirements/Verify.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Verify_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Refine_Abstraction" label="Refine" description="Create a Refine" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Refine_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Trace_Abstraction" label="Trace" description="Create a Trace" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Trace_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Link" label="Link" description="Create a Link" kind="ConnectionTool">
- <icon pluginID="org.eclipse.papyrus.uml.diagram.clazz" iconPath="icons/obj16/Link.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Link_4016"/>
- </ownedConfigurations>
- </drawerConfigurations>
- <drawerConfigurations id="Deprecated" label="Deprecated" description="Deprecated">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Property" label="Property (Deprecated)" description="Create a Deprecated Property">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Property_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification" label="InstanceSpecification (Deprecated)" description="Create a Deprecated InstanceSpecification">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/InstanceSpecification.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Class" label="Class (Deprecated)" description="Create a Deprecated Class" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Class_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Association" label="Association (Deprecated)" description="Create a Deprecated Association" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Association.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_2015"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4001"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Association_4019"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_Generalization" label="Generalization (Deprecated)" description="Create a Deprecated Generalization" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Deprecated_DataType" label="DataType (Deprecated)" description="Create a Deprecated DataType">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/DataType.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_2010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3027"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3043"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3044"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Deprecated_DataType_3045"/>
+ <drawerConfigurations
+ id="palette.sysml.requirement.edges"
+ label="Edges"
+ description="Edges">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Copy_Abstraction"
+ label="Copy"
+ description="Create a Copy"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Copy.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Copy_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction"
+ label="DeriveReqt"
+ description="Create a DeriveReqt Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DeriveReqt_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Satisfy_Abstraction"
+ label="Satisfy"
+ description="Create a Satisfy"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Satisfy.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Satisfy_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Verify_Abstraction"
+ label="Verify"
+ description="Create a Verify">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/requirements/Verify.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Verify_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Refine_Abstraction"
+ label="Refine"
+ description="Create a Refine"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Refine_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Trace_Abstraction"
+ label="Trace"
+ description="Create a Trace"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Trace_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Link"
+ label="Link"
+ description="Create a Link"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.papyrus.uml.diagram.clazz"
+ iconPath="icons/obj16/Link.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.uml.diagram.clazz.Link_4016"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="Other SysML Elements" label="Other SysML Elements" description="Other SysML Elements">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDi" label="View" description="Create a View">
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDiagram"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Allocated" label="Allocated" description="Create a Allocated">
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Allocated_2097"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.RequirementRelated" label="RequirementRelated" description="Create a RequirementRelated">
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.RequirementRelated_2097"/>
+ <drawerConfigurations
+ id="Other SysML Elements"
+ label="Other SysML Elements"
+ description="Other SysML Elements">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDi"
+ label="View"
+ description="Create a View">
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Package_PapyrusUMLClassDiagram"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Allocated"
+ label="Allocated"
+ description="Create a Allocated">
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Allocated_2097"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.RequirementRelated"
+ label="RequirementRelated"
+ description="Create a RequirementRelated">
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.RequirementRelated_2097"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="Nodes" label="Other Nodes" description="Other Nodes">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.AdjunctProperty" label="AdjunctProperty" description="Create a AdjunctProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.BoundReference" label="BoundReference" description="Create a BoundReference">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty" label="ClassifierBehaviorProperty" description="Create a ClassifierBehaviorProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ConnectorProperty" label="ConnectorProperty" description="Create a ConnectorProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ConstraintBlock" label="ConstraintBlock" description="Create a ConstraintBlock">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/constraints/ConstraintBlock.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ControlOperator_Operation" label="ControlOperator" description="Create a ControlOperator">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Operation.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3003"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3007"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3013"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3019"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3042"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.DistributedProperty" label="DistributedProperty" description="Create a DistributedProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ElementGroup" label="ElementGroup" description="Create a ElementGroup">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Comment.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_2012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_3028"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.EndPathMultiplicity" label="EndPathMultiplicity" description="Create a EndPathMultiplicity">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.FlowProperty" label="FlowProperty" description="Create a FlowProperty">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/portandflows/FlowProperty.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.FlowSpecification" label="FlowSpecification" description="Create a FlowSpecification">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Interface.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_2004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3023"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3036"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3037"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3038"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.InterfaceBlock" label="InterfaceBlock" description="Create a InterfaceBlock">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ParticipantProperty" label="ParticipantProperty" description="Create a ParticipantProperty">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Property.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3002"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3005"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3006"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3012"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3018"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3041"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Package" label="View" description="Create a View">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Package.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_2007"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Package_3009"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ViewPoint" label="ViewPoint" description="Create a ViewPoint">
- <icon pluginID="org.eclipse.papyrus.sysml.edit" iconPath="icons/full/obj16/ViewPoint.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.View_Class" label="View Class" description="Create a View Class">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Class.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.View_Class_3014"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ValueType" label="ValueType" description="Create a ValueType">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/ValueType.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Block" label="Block" description="Create a Block">
- <icon pluginID="org.eclipse.papyrus.sysml" iconPath="icons/blocks/Block.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_2008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3004"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3010"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Block_3014"/>
+ <drawerConfigurations
+ id="Nodes"
+ label="Other Nodes"
+ description="Other Nodes">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.AdjunctProperty"
+ label="AdjunctProperty"
+ description="Create a AdjunctProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.AdjunctProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.BoundReference"
+ label="BoundReference"
+ description="Create a BoundReference">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.BoundReference_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty"
+ label="ClassifierBehaviorProperty"
+ description="Create a ClassifierBehaviorProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ClassifierBehaviorProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ConnectorProperty"
+ label="ConnectorProperty"
+ description="Create a ConnectorProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConnectorProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ConstraintBlock"
+ label="ConstraintBlock"
+ description="Create a ConstraintBlock">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/constraints/ConstraintBlock.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ConstraintBlock_3014"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ControlOperator_Operation"
+ label="ControlOperator"
+ description="Create a ControlOperator">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Operation.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3003"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3007"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3013"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3019"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ControlOperator_Operation_3042"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.DistributedProperty"
+ label="DistributedProperty"
+ description="Create a DistributedProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.DistributedProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ElementGroup"
+ label="ElementGroup"
+ description="Create a ElementGroup">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Comment.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_2012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ElementGroup_3028"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.EndPathMultiplicity"
+ label="EndPathMultiplicity"
+ description="Create a EndPathMultiplicity">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.EndPathMultiplicity_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.FlowProperty"
+ label="FlowProperty"
+ description="Create a FlowProperty">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/portandflows/FlowProperty.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.FlowSpecification"
+ label="FlowSpecification"
+ description="Create a FlowSpecification">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Interface.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_2004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3023"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3036"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3037"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.FlowSpecification_3038"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.InterfaceBlock"
+ label="InterfaceBlock"
+ description="Create a InterfaceBlock">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Class.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.InterfaceBlock_3014"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ParticipantProperty"
+ label="ParticipantProperty"
+ description="Create a ParticipantProperty">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Property.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3002"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3005"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3006"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3012"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3018"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ParticipantProperty_3041"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.View_Package"
+ label="View"
+ description="Create a View">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Package.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Package_2007"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Package_3009"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ViewPoint"
+ label="ViewPoint"
+ description="Create a ViewPoint">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml.edit"
+ iconPath="icons/full/obj16/ViewPoint.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ViewPoint_3014"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.View_Class"
+ label="View Class"
+ description="Create a View Class">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Class.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Class_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Class_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Class_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Class_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.View_Class_3014"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ValueType"
+ label="ValueType"
+ description="Create a ValueType">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/blocks/ValueType.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ValueType_2010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ValueType_3027"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ValueType_3043"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ValueType_3044"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ValueType_3045"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Block"
+ label="Block"
+ description="Create a Block">
+ <icon
+ pluginID="org.eclipse.papyrus.sysml"
+ iconPath="icons/blocks/Block.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Block_2008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Block_3004"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Block_3008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Block_3010"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Block_3014"/>
</ownedConfigurations>
</drawerConfigurations>
- <drawerConfigurations id="Edges" label="Other Edges" description="Other Edges">
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Conform_Generalization" label="Conform" description="Create a Conform Generalization" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Generalization.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Generalization_4002"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Allocate_Abstraction" label="Allocate" description="Create a Allocate Abstraction" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Abstraction.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Allocate_Abstraction_4006"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Conform_Dependency" label="Conform" description="Create a Conform " kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_2014"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4018"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.Expose" label="Expose" description="Create a Expose" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/Dependency.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_2014"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_4008"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.Expose_4018"/>
- </ownedConfigurations>
- <ownedConfigurations xsi:type="paletteconfiguration:ToolConfiguration" id="org.eclipse.papyrus.sysML.ItemFlow" label="ItemFlow" description="Create a ItemFlow" kind="ConnectionTool">
- <icon pluginID="org.eclipse.uml2.uml.edit" iconPath="icons/full/obj16/InformationFlow.gif"/>
- <elementDescriptors elementTypeId="org.eclipse.papyrus.sysML.ItemFlow_4026"/>
+ <drawerConfigurations
+ id="Edges"
+ label="Other Edges"
+ description="Other Edges">
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Conform_Generalization"
+ label="Conform"
+ description="Create a Conform Generalization"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Generalization.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Conform_Generalization_4002"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Allocate_Abstraction"
+ label="Allocate"
+ description="Create a Allocate Abstraction"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Abstraction.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Allocate_Abstraction_4006"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Conform_Dependency"
+ label="Conform"
+ description="Create a Conform "
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_2014"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Conform_Dependency_4018"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.Expose"
+ label="Expose"
+ description="Create a Expose"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/Dependency.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Expose_2014"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Expose_4008"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.Expose_4018"/>
+ </ownedConfigurations>
+ <ownedConfigurations
+ xsi:type="paletteconfiguration:ToolConfiguration"
+ id="org.eclipse.papyrus.sysML.ItemFlow"
+ label="ItemFlow"
+ description="Create a ItemFlow"
+ kind="ConnectionTool">
+ <icon
+ pluginID="org.eclipse.uml2.uml.edit"
+ iconPath="icons/full/obj16/InformationFlow.gif"/>
+ <elementDescriptors
+ elementTypeId="org.eclipse.papyrus.sysML.ItemFlow_4026"/>
</ownedConfigurations>
</drawerConfigurations>
</paletteconfiguration:PaletteConfiguration>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations
index 871fc68ff07..3ddad5a2ed3 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.service.types/model/SysML14.elementtypesconfigurations
@@ -1253,125 +1253,6 @@
</elementTypeConfigurations>
<elementTypeConfigurations
xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnXLwFEeSwNLK2W02HwA"
- name="Deprecated ValueSpecification"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification"
- hint="UML::ValueSpecification">
- <iconEntry
- xmi:id="_k4SnXbwFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/ValueSpecification.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.ValueSpecification</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnXrwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnX7wFEeSwNLK2W02HwA"
- name="Deprecated Property"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_Property"
- hint="UML::Property">
- <iconEntry
- xmi:id="_k4SnYLwFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/Property.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Property</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnYbwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnYrwFEeSwNLK2W02HwA"
- name="Deprecated InstanceSpecification"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification"
- hint="UML::InstanceSpecification">
- <iconEntry
- xmi:id="_k4SnY7wFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/InstanceSpecification.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.InstanceSpecification</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnZLwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnZbwFEeSwNLK2W02HwA"
- name="Deprecated Class"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_Class"
- hint="UML::Class">
- <iconEntry
- xmi:id="_k4SnZrwFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/Class.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Class</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnZ7wFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnaLwFEeSwNLK2W02HwA"
- name="Deprecated Association"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_Association"
- hint="UML::Association">
- <iconEntry
- xmi:id="_k4SnabwFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/Association.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Association</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnarwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4Sna7wFEeSwNLK2W02HwA"
- name="Deprecated Generalization"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_Generalization"
- hint="UML::Generalization">
- <iconEntry
- xmi:id="_k4SnbLwFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/Generalization.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.Generalization</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SnbbwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
- xmi:id="_k4SnbrwFEeSwNLK2W02HwA"
- name="Deprecated DataType"
- identifier="org.eclipse.papyrus.SysML14.Deprecated_DataType"
- hint="UML::DataType">
- <iconEntry
- xmi:id="_k4Snb7wFEeSwNLK2W02HwA"
- iconPath="/icons/full/obj16/DataType.gif"
- bundleId="org.eclipse.uml2.uml.edit"/>
- <specializedTypesID>org.eclipse.papyrus.uml.DataType</specializedTypesID>
- <matcherConfiguration
- xsi:type="stereotypeapplicationmatcherconfiguration:StereotypeApplicationMatcherConfiguration"
- xmi:id="_k4SncLwFEeSwNLK2W02HwA">
- <stereotypesQualifiedNames>SysML::DeprecatedElements::Deprecated</stereotypesQualifiedNames>
- </matcherConfiguration>
- </elementTypeConfigurations>
- <elementTypeConfigurations
- xsi:type="elementtypesconfigurations:SpecializationTypeConfiguration"
xmi:id="_5R-xwOgeEeSUQvXhEVQh8w"
name="Unit"
identifier="org.eclipse.papyrus.SysML14.Unit"
@@ -2365,91 +2246,37 @@
<adviceBindingsConfigurations
xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
xmi:id="_k4SoA7wFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4SnXLwFEeSwNLK2W02HwA">
+ name="Apply Deprecated to Flow Port"
+ identifier="org.eclipse.papyrus.SysML14.deprecated.flowport"
+ editHelperAdviceClassName=""
+ target="_k4SnULwFEeSwNLK2W02HwA">
<stereotypesToApply
xmi:id="_k4SoBLwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
+ stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated">
<requiredProfiles>SysML</requiredProfiles>
</stereotypesToApply>
</adviceBindingsConfigurations>
<adviceBindingsConfigurations
xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
xmi:id="_k4SoBbwFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4SnX7wFEeSwNLK2W02HwA">
+ name="Apply Deprecated to Flow Specification"
+ identifier="org.eclipse.papyrus.SysML14.deprecated.flowspecification"
+ target="_k4SnU7wFEeSwNLK2W02HwA">
<stereotypesToApply
xmi:id="_k4SoBrwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
+ stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated">
<requiredProfiles>SysML</requiredProfiles>
</stereotypesToApply>
</adviceBindingsConfigurations>
<adviceBindingsConfigurations
xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
xmi:id="_k4SoB7wFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4SnYrwFEeSwNLK2W02HwA">
+ name="Apply Deprecated to Allocated"
+ identifier="org.eclipse.papyrus.SysML14.deprecated.allocated"
+ target="_k4SnVrwFEeSwNLK2W02HwA">
<stereotypesToApply
xmi:id="_k4SoCLwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations
- xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
- xmi:id="_k4SoCbwFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4SnZbwFEeSwNLK2W02HwA">
- <stereotypesToApply
- xmi:id="_k4SoCrwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations
- xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
- xmi:id="_k4SoC7wFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated_UML::Association"
- target="_k4SnaLwFEeSwNLK2W02HwA">
- <stereotypesToApply
- xmi:id="_k4SoDLwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations
- xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
- xmi:id="_k4SoDbwFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4Sna7wFEeSwNLK2W02HwA">
- <stereotypesToApply
- xmi:id="_k4SoDrwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
- <requiredProfiles>SysML</requiredProfiles>
- </stereotypesToApply>
- </adviceBindingsConfigurations>
- <adviceBindingsConfigurations
- xsi:type="applystereotypeadviceconfiguration:ApplyStereotypeAdviceConfiguration"
- xmi:id="_k4SoD7wFEeSwNLK2W02HwA"
- name="Apply Deprecated"
- identifier="org.eclipse.papyrus.SysML14.deprecated"
- target="_k4SnbrwFEeSwNLK2W02HwA">
- <stereotypesToApply
- xmi:id="_k4SoELwFEeSwNLK2W02HwA"
- stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated"
- updateName="true">
+ stereotypeQualifiedName="SysML::DeprecatedElements::Deprecated">
<requiredProfiles>SysML</requiredProfiles>
</stereotypesToApply>
</adviceBindingsConfigurations>
diff --git a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel
index 58b76238988..b33b6e31785 100644
--- a/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel
+++ b/plugins/sysml/sysml14/org.eclipse.papyrus.sysml14.ui/resources/SysML14.creationmenumodel
@@ -303,33 +303,4 @@
xmi:id="_V9D8cOjrEeS0s_Pe-G3XMA"
label="Unit"
elementTypeIdRef="org.eclipse.papyrus.SysML14.Unit"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZz8yuEeSuYbPdZwWlyw"
- label="ValueSpecification (Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ0MyuEeSuYbPdZwWlyw"
- label="Property (Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Property"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ0cyuEeSuYbPdZwWlyw"
- label="InstanceSpecification(Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ0syuEeSuYbPdZwWlyw"
- label="Class (Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Class"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ08yuEeSuYbPdZwWlyw"
- label="Association (Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Association_UML::Association"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ1MyuEeSuYbPdZwWlyw"
- label="Generalization (Deprecated)"
- icon=""
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_Generalization"/>
- <menu xsi:type="ElementCreationMenuModel:CreationMenu"
- xmi:id="_FUgZ1cyuEeSuYbPdZwWlyw"
- label="DataType (Deprecated)"
- elementTypeIdRef="org.eclipse.papyrus.SysML14.Deprecated_DataType"/>
</ElementCreationMenuModel:Folder>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java
index 4f8e7b057c7..112f9a976e7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/BorderItemNameEditPart.java
@@ -1,680 +1,678 @@
-/**
- * Copyright (c) 2015 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.diagram.common.editparts;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.draw2d.IFigure;
-import org.eclipse.draw2d.Label;
-import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.draw2d.geometry.Rectangle;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.RunnableWithResult;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gef.AccessibleEditPart;
-import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.Request;
-import org.eclipse.gef.requests.DirectEditRequest;
-import org.eclipse.gef.tools.CellEditorLocator;
-import org.eclipse.gef.tools.DirectEditManager;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
-import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
-import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
-import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
-import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
-import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
-import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
-import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
-import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
-import org.eclipse.gmf.runtime.notation.FontStyle;
-import org.eclipse.gmf.runtime.notation.NotationPackage;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.viewers.ICellEditorValidator;
-import org.eclipse.jface.window.Window;
-import org.eclipse.papyrus.extensionpoints.editors.Activator;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
-import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
-import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
-import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
-import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy;
-import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
-import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
-import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
-import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator;
-import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
-import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.BusyIndicator;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Feature;
-
-public class BorderItemNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
-
-
- private DirectEditManager manager;
-
- private IParser parser;
- private List<?> parserElements;
-
- private String defaultText;
-
- /**
- * direct edition mode (default, undefined, registered editor, etc.)
- * @generated
- */
- protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
-
- /**
- * configuration from a registered edit dialog
- * @generated
- */
- protected IDirectEditorConfiguration configuration;
-
-
- public BorderItemNameEditPart(View view) {
- super(view);
- }
-
- protected void createDefaultEditPolicies() {
- super.createDefaultEditPolicies();
- installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
- installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
- installEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL, new OperationLabelEditPolicy());
- installEditPolicy(LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY, new LabelAlignmentEditPolicy());
- installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
- }
-
- @Override
- protected boolean getDefaultLabelVisibility() {
- return true;
- }
- public IBorderItemLocator getBorderItemLocator() {
- IFigure parentFigure = getFigure().getParent();
- if(parentFigure != null && parentFigure.getLayoutManager() != null) {
- Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
- return (IBorderItemLocator)constraint;
- }
- return null;
- }
-
- public void refreshBounds() {
- int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
- int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
- int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
- int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
- getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
- }
-
- protected String getLabelTextHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getText();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getText();
- } else {
- return ((Label)figure).getText();
- }
- }
-
- protected void setLabelTextHelper(IFigure figure, String text) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setText(text);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setText(text);
- } else {
- ((Label)figure).setText(text);
- }
- }
-
- protected Image getLabelIconHelper(IFigure figure) {
- if(figure instanceof WrappingLabel) {
- return ((WrappingLabel)figure).getIcon();
- } else if(figure instanceof ILabelFigure) {
- return ((ILabelFigure)figure).getIcon();
- } else {
- return ((Label)figure).getIcon();
- }
- }
-
- protected void setLabelIconHelper(IFigure figure, Image icon) {
- if(figure instanceof WrappingLabel) {
- ((WrappingLabel)figure).setIcon(icon);
- } else if(figure instanceof ILabelFigure) {
- ((ILabelFigure)figure).setIcon(icon);
- } else {
- ((Label)figure).setIcon(icon);
- }
- }
-
- public void setLabel(IFigure figure) {
- unregisterVisuals();
- setFigure(figure);
- defaultText = getLabelTextHelper(figure);
- registerVisuals();
- refreshVisuals();
- }
-
- /**
- * @generated
- */
- protected List<?> getModelChildren() {
- return Collections.EMPTY_LIST;
- }
-
- public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
- return null;
- }
-
- public void setParser(IParser parser) {
- this.parser = parser;
- }
-
- protected EObject getParserElement() {
- return resolveSemanticElement();
- }
-
- protected Image getLabelIcon() {
- EObject parserElement = getParserElement();
- if(parserElement == null) {
- return null;
- }
- List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for(View view : views) {
- if(AppearanceHelper.showElementIcon(view)) {
- return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass());
- }
- }
- return null;
- }
-
- protected String getLabelText() {
- String text = null;
- EObject parserElement = getParserElement();
- if(parserElement != null && getParser() != null) {
- text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
- }
- if(text == null || text.length() == 0) {
- text = defaultText;
- }
- return text;
- }
-
- public void setLabelText(String text) {
- setLabelTextHelper(getFigure(), text);
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- public String getEditText() {
- if(getParserElement() == null || getParser() == null) {
- return ""; //$NON-NLS-1$
- }
- return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
- }
-
- protected boolean isEditable() {
- return getParser() != null;
- }
-
- public ICellEditorValidator getEditTextValidator() {
- return new ICellEditorValidator() {
-
- @Override
- public String isValid(final Object value) {
- if(value instanceof String) {
- final EObject element = getParserElement();
- final IParser parser = getParser();
- try {
- IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
-
- @Override
- public void run() {
- setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
- }
- });
- return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- }
- }
- // shouldn't get here
- return null;
- }
- };
- }
-
- public IContentAssistProcessor getCompletionProcessor() {
- if(getParserElement() == null || getParser() == null) {
- return null;
- }
- return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
- }
-
- public ParserOptions getParserOptions() {
- return ParserOptions.NONE;
- }
-
- public IParser getParser() {
- if(parser == null) {
- parser = new NamedElementLabelParser();
-
- }
- return parser;
- }
-
- protected DirectEditManager getManager() {
- if(manager == null) {
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
- }
- return manager;
- }
-
- protected void setManager(DirectEditManager manager) {
- this.manager = manager;
- }
-
- protected void performDirectEdit() {
- BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
-
- @Override
- public void run() {
- getManager().show();
- }
- });
- }
-
- protected void performDirectEdit(Point eventLocation) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
- }
- }
-
- private void performDirectEdit(char initialCharacter) {
- if(getManager() instanceof TextDirectEditManager) {
- ((TextDirectEditManager)getManager()).show(initialCharacter);
- } else {
- performDirectEdit();
- }
- }
-
- public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
- if (source.getFigure() instanceof IMultilineEditableFigure) {
- return new MultilineCellEditorLocator(
- (IMultilineEditableFigure) source.getFigure());
- }
- else {
- return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
- }
- }
-
- protected void performDirectEditRequest(Request request) {
- final Request theRequest = request;
- if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
- directEditionMode = getDirectEditionType();
- }
- switch(directEditionMode) {
- case IDirectEdition.NO_DIRECT_EDITION:
- // no direct edition mode => does nothing
- return;
- case IDirectEdition.EXTENDED_DIRECT_EDITOR:
- updateExtendedEditorConfiguration();
- if(configuration == null || configuration.getLanguage() == null) {
- // Create default edit manager
- setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
- performDefaultDirectEditorEdit(theRequest);
- } else {
- configuration.preEditAction(resolveSemanticElement());
- Dialog dialog = null;
- if(configuration instanceof ICustomDirectEditorConfiguration) {
- setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
- initializeDirectEditManager(theRequest);
- return;
- } else if(configuration instanceof IPopupEditorConfiguration) {
- IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
- helper.showEditor();
- return;
- } else if(configuration instanceof IAdvancedEditorConfiguration) {
- dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
- } else if(configuration instanceof IDirectEditorConfiguration) {
- dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
- } else {
- return;
- }
- final Dialog finalDialog = dialog;
- if(Window.OK == dialog.open()) {
- TransactionalEditingDomain domain = getEditingDomain();
- RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
-
- @Override
- protected void doExecute() {
- configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
- }
- };
- domain.getCommandStack().execute(command);
- }
- }
- break;
- case IDirectEdition.DEFAULT_DIRECT_EDITOR:
- initializeDirectEditManager(theRequest);
- break;
- default:
- break;
- }
- }
-
- protected void initializeDirectEditManager(final Request request) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if(isActive() && isEditable()) {
- if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void refreshVisuals() {
- super.refreshVisuals();
- refreshLabel();
- refreshFont();
- refreshFontColor();
- refreshUnderline();
- refreshStrikeThrough();
- }
-
- protected void refreshLabel() {
- EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
- if(maskLabelPolicy == null) {
- maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
- }
- if(maskLabelPolicy == null) {
- View view = (View)getModel();
- if(view.isVisible()) {
- setLabelTextHelper(getFigure(), getLabelText());
- setLabelIconHelper(getFigure(), getLabelIcon());
- } else {
- setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
- setLabelIconHelper(getFigure(), null);
- }
- }
- Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
- if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
- }
- Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
- if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
- ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
- }
- }
-
- protected void refreshUnderline() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
- }
- if(resolveSemanticElement() instanceof Feature) {
- if(((Feature)resolveSemanticElement()).isStatic()) {
- ((WrappingLabel)getFigure()).setTextUnderline(true);
- } else {
- ((WrappingLabel)getFigure()).setTextUnderline(false);
- }
- }
- }
-
- protected void refreshStrikeThrough() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null && getFigure() instanceof WrappingLabel) {
- ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
- }
- }
-
- protected void refreshFont() {
- FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
- if(style != null) {
- FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
- setFont(fontData);
- }
- }
-
- protected void setFontColor(Color color) {
- getFigure().setForegroundColor(color);
- }
-
- protected void addSemanticListeners() {
- if(getParser() instanceof ISemanticParser) {
- EObject element = resolveSemanticElement();
- parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
- for(int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
- }
- } else {
- super.addSemanticListeners();
- }
- }
-
- protected void removeSemanticListeners() {
- if(parserElements != null) {
- for(int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
- }
- } else {
- super.removeSemanticListeners();
- }
- }
-
- protected AccessibleEditPart getAccessibleEditPart() {
- if(accessibleEP == null) {
- accessibleEP = new AccessibleGraphicalEditPart() {
-
- @Override
- public void getName(AccessibleEvent e) {
- e.result = getLabelTextHelper(getFigure());
- }
- };
- }
- return accessibleEP;
- }
-
- private View getFontStyleOwnerView() {
- return getPrimaryView();
- }
-
- /**
- * Returns the kind of associated editor for direct edition.
- *
- * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
- * @generated
- */
- public int getDirectEditionType() {
- if(checkExtendedEditor()) {
- initExtendedEditorConfiguration();
- return IDirectEdition.EXTENDED_DIRECT_EDITOR;
- }
- if(checkDefaultEdition()) {
- return IDirectEdition.DEFAULT_DIRECT_EDITOR;
- }
- // not a named element. no specific editor => do nothing
- return IDirectEdition.NO_DIRECT_EDITION;
- }
-
- /**
- * Checks if an extended editor is present.
- *
- * @return <code>true</code> if an extended editor is present.
- * @generated
- */
- protected boolean checkExtendedEditor() {
- if(resolveSemanticElement() != null) {
- return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
- }
- return false;
- }
-
- /**
- * Checks if a default direct edition is available
- *
- * @return <code>true</code> if a default direct edition is available
- * @generated
- */
- protected boolean checkDefaultEdition() {
- return (getParser() != null);
- }
-
- /**
- * Initializes the extended editor configuration
- * @generated
- */
- protected void initExtendedEditorConfiguration() {
- if(configuration == null) {
- final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("")) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else {
- configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
- }
- }
- }
-
- /**
- * Updates the preference configuration
- * @generated
- */
- protected void updateExtendedEditorConfiguration() {
- String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
- if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
- configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
- } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
- configuration = null;
- }
- }
-
- /**
- * Performs the direct edit usually used by GMF editors.
- * @param theRequest the direct edit request that starts the direct edit system
- * @generated
- */
- protected void performDefaultDirectEditorEdit(final Request theRequest) {
- // initialize the direct edit manager
- try {
- getEditingDomain().runExclusive(new Runnable() {
-
- @Override
- public void run() {
- if(isActive() && isEditable()) {
- if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
- Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
- performDirectEdit(initialChar.charValue());
- } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
- DirectEditRequest editRequest = (DirectEditRequest)theRequest;
- performDirectEdit(editRequest.getLocation());
- } else {
- performDirectEdit();
- }
- }
- }
- });
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
-
- protected void handleNotificationEvent(Notification event) {
- Object feature = event.getFeature();
- if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
- Integer c = (Integer)event.getNewValue();
- setFontColor(DiagramColorRegistry.getInstance().getColor(c));
- } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
- refreshUnderline();
- } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
- refreshStrikeThrough();
- } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
- refreshFont();
- } else {
- if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
- refreshLabel();
- }
- if(getParser() instanceof ISemanticParser) {
- ISemanticParser modelParser = (ISemanticParser)getParser();
- if(modelParser.areSemanticElementsAffected(null, event)) {
- removeSemanticListeners();
- if(resolveSemanticElement() != null) {
- addSemanticListeners();
- }
- refreshLabel();
- }
- }
- }
- super.handleNotificationEvent(event);
- }
-
- /**
- * @generated
- */
- protected IFigure createFigure() {
- IFigure label = createFigurePrim();
- defaultText = getLabelTextHelper(label);
- return label;
- }
-
- /**
- * @generated
- */
- protected IFigure createFigurePrim() {
- return new PapyrusWrappingLabel();
- }
-}
+/**
+ * Copyright (c) 2015 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.diagram.common.editparts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.CellEditorLocator;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.directedit.locator.CellEditorLocatorAccess;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.ExternalLabelPrimaryDragRoleEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IndirectMaskLabelEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.LabelAlignmentEditPolicy;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.IMultilineEditableFigure;
+import org.eclipse.papyrus.uml.diagram.common.locator.MultilineCellEditorLocator;
+import org.eclipse.papyrus.uml.diagram.common.parser.NamedElementLabelParser;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+public class BorderItemNameEditPart extends FloatingLabelEditPart implements ITextAwareEditPart, IBorderItemEditPart {
+
+
+ private DirectEditManager manager;
+
+ private IParser parser;
+ private List<?> parserElements;
+
+ private String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+
+ public BorderItemNameEditPart(View view) {
+ super(view);
+ }
+
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(LabelAlignmentEditPolicy.LABEL_ALIGNMENT_KEY, new LabelAlignmentEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ExternalLabelPrimaryDragRoleEditPolicy());
+ }
+
+ @Override
+ protected boolean getDefaultLabelVisibility() {
+ return true;
+ }
+ public IBorderItemLocator getBorderItemLocator() {
+ IFigure parentFigure = getFigure().getParent();
+ if(parentFigure != null && parentFigure.getLayoutManager() != null) {
+ Object constraint = parentFigure.getLayoutManager().getConstraint(getFigure());
+ return (IBorderItemLocator)constraint;
+ }
+ return null;
+ }
+
+ public void refreshBounds() {
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
+ }
+
+ protected String getLabelTextHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
+ } else {
+ return ((Label)figure).getText();
+ }
+ }
+
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
+ } else {
+ ((Label)figure).setText(text);
+ }
+ }
+
+ protected Image getLabelIconHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
+ } else {
+ return ((Label)figure).getIcon();
+ }
+ }
+
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
+ } else {
+ ((Label)figure).setIcon(icon);
+ }
+ }
+
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if(parserElement == null) {
+ return null;
+ }
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
+ return org.eclipse.papyrus.uml.diagram.common.Activator.getDefault().getImage(parserElement.eClass());
+ }
+ }
+ return null;
+ }
+
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ public String getEditText() {
+ if(getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ @Override
+ public String isValid(final Object value) {
+ if(value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ @Override
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
+ return valid.getCode() == IParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ public IContentAssistProcessor getCompletionProcessor() {
+ if(getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ public IParser getParser() {
+ if(parser == null) {
+ parser = new NamedElementLabelParser();
+
+ }
+ return parser;
+ }
+
+ protected DirectEditManager getManager() {
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ @Override
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+ protected void performDirectEdit(Point eventLocation) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ private void performDirectEdit(char initialCharacter) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ public static CellEditorLocator getTextCellEditorLocator(ITextAwareEditPart source) {
+ if (source.getFigure() instanceof IMultilineEditableFigure) {
+ return new MultilineCellEditorLocator(
+ (IMultilineEditableFigure) source.getFigure());
+ }
+ else {
+ return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
+
+ }
+ }
+
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch(directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if(configuration == null || configuration.getLanguage() == null) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()), configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+ if(Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if(maskLabelPolicy == null) {
+ maskLabelPolicy = getEditPolicy(IndirectMaskLabelEditPolicy.INDRIRECT_MASK_MANAGED_LABEL);
+ }
+ if(maskLabelPolicy == null) {
+ View view = (View)getModel();
+ if(view.isVisible()) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ } else {
+ setLabelTextHelper(getFigure(), ""); //$NON-NLS-1$
+ setLabelIconHelper(getFigure(), null);
+ }
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ protected void refreshFont() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ protected void addSemanticListeners() {
+ if(getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ protected void removeSemanticListeners() {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if(accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ @Override
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ private View getFontStyleOwnerView() {
+ return getPrimaryView();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if(checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if(checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if(resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if(configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ * @param theRequest the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ @Override
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void handleNotificationEvent(Notification event) {
+ Object feature = event.getFeature();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if(resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ IFigure label = createFigurePrim();
+ defaultText = getLabelTextHelper(label);
+ return label;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigurePrim() {
+ return new PapyrusWrappingLabel();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF
index c24682fbe3b..9253047c54d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/META-INF/MANIFEST.MF
@@ -67,7 +67,9 @@ Require-Bundle: org.eclipse.core.expressions,
org.eclipse.papyrus.uml.diagram.menu;bundle-version="1.1.0",
org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.canonical;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0"
Bundle-Vendor: %providerName
Eclipse-LazyStart: true
Bundle-Version: 1.1.0.qualifier
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java
new file mode 100644
index 00000000000..b5378ed18c3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/canonical/LifelineSemanticChildrenStrategy.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * 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:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.sequence.canonical;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.canonical.DefaultUMLSemanticChildrenStrategy;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ExecutionSpecification;
+import org.eclipse.uml2.uml.Lifeline;
+import org.eclipse.uml2.uml.MessageEnd;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Custom semantic-children strategy for lifelines in sequence diagrams.
+ */
+public class LifelineSemanticChildrenStrategy extends DefaultUMLSemanticChildrenStrategy {
+
+ public LifelineSemanticChildrenStrategy() {
+ super();
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticChildren(EObject semanticFromEditPart, View viewFromEditPart) {
+ List<? extends EObject> _result;
+
+ if (semanticFromEditPart instanceof Lifeline) {
+ // Get the execution specifications covering it
+ Lifeline lifeline = (Lifeline) semanticFromEditPart;
+
+ List<EObject> result = Lists.newArrayList();
+ _result = result;
+
+ Iterables.addAll(result, Iterables.filter(lifeline.getCoveredBys(), ExecutionSpecification.class));
+ } else {
+ _result = super.getCanonicalSemanticChildren(semanticFromEditPart, viewFromEditPart);
+ }
+
+ return _result;
+ }
+
+ @Override
+ public List<? extends EObject> getCanonicalSemanticConnections(EObject semanticFromEditPart, View viewFromEditPart) {
+ // Lifelines are responsible for the messages connected to them via message-ends
+ List<? extends EObject> result = null;
+
+ Lifeline lifeline = (semanticFromEditPart instanceof Lifeline) ? (Lifeline) semanticFromEditPart : null;
+ if (lifeline != null) {
+ List<Element> messages = Lists.newArrayList();
+ result = messages;
+
+ for (MessageEnd next : Iterables.filter(lifeline.getCoveredBys(), MessageEnd.class)) {
+ if (next.getMessage() != null) {
+ messages.add(next.getMessage());
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java
index 2a15ab91230..5b1488cb4e4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/parts/CustomLifelineEditPart.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA
+ * Copyright (c) 2010, 2015 CEA, Christian W. Damus, and others
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Soyatec - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.parts;
@@ -257,7 +258,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
// DestructionOccurrenceSpecification is always on the bottom
if (anchor.eContainer() instanceof Edge) {
Edge edge = (Edge) anchor.eContainer();
- if (edge.getElement() instanceof Message && ((Message)edge.getElement()).getReceiveEvent() instanceof DestructionOccurrenceSpecification) {
+ if (edge.getElement() instanceof Message && ((Message) edge.getElement()).getReceiveEvent() instanceof DestructionOccurrenceSpecification) {
if (anchor.equals(edge.getTargetAnchor())) {
return "(0.5, 1.0)";
}
@@ -468,7 +469,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
case TimeConstraintEditPart.VISUAL_ID:
case TimeObservationEditPart.VISUAL_ID:
case DurationConstraintEditPart.VISUAL_ID:
- //case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
+ // case DestructionOccurrenceSpecificationEditPart.VISUAL_ID:
return new BorderItemResizableEditPolicy();
}
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
@@ -860,11 +861,11 @@ public class CustomLifelineEditPart extends LifelineEditPart {
if (!(part instanceof GraphicalEditPart)) {
continue;
}
- if (ignoreDestructionOccurence) {
+ if (ignoreDestructionOccurence) {
if (part instanceof DestructionOccurrenceSpecificationEditPart) {
continue;
}
- if (part.getParent() instanceof CustomMessage5EditPart && ((CustomMessage5EditPart)part.getParent()).getSource() != this) {
+ if (part.getParent() instanceof CustomMessage5EditPart && ((CustomMessage5EditPart) part.getParent()).getSource() != this) {
continue;
}
}
@@ -1289,35 +1290,35 @@ public class CustomLifelineEditPart extends LifelineEditPart {
if (false == getParent() instanceof CustomInteractionInteractionCompartmentEditPart) {
return -1;
}
- CustomInteractionInteractionCompartmentEditPart parentEP = (CustomInteractionInteractionCompartmentEditPart)getParent();
- CustomInteractionEditPart grandParent = (CustomInteractionEditPart)parentEP.getParent();
+ CustomInteractionInteractionCompartmentEditPart parentEP = (CustomInteractionInteractionCompartmentEditPart) getParent();
+ CustomInteractionEditPart grandParent = (CustomInteractionEditPart) parentEP.getParent();
final Bounds bounds = (Bounds) ((Shape) getModel()).getLayoutConstraint();
- final Bounds boundsGrandParent = (Bounds) ((Shape)grandParent.getModel()).getLayoutConstraint();
+ final Bounds boundsGrandParent = (Bounds) ((Shape) grandParent.getModel()).getLayoutConstraint();
if (bounds != null && boundsGrandParent != null) {
Rectangle grandParentRect = OperandBoundsComputeHelper.fillRectangle(boundsGrandParent);
if (grandParentRect.height == -1) {
grandParentRect = grandParent.getFigure().getBounds().getCopy();
- }
+ }
Rectangle boundsRect = OperandBoundsComputeHelper.fillRectangle(bounds);
if (boundsRect.height == -1) {
boundsRect.height = this.getFigure().getBounds().height;
}
grandParent.getFigure().translateToRelative(boundsRect);
- //return boundsGrandParent.getHeight() - boundsRect.y - LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING;
+ // return boundsGrandParent.getHeight() - boundsRect.y - LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING;
int heightDiff = grandParent.getFigure().getBounds().height - parentEP.getFigure().getBounds().height;
Dimension zoomedAddon = new Dimension(0, LifelineXYLayoutEditPolicy.LIFELINE_SOUTH_SPACING);
grandParent.getFigure().translateToRelative(zoomedAddon);
return grandParentRect.height() - bounds.getY() - heightDiff - zoomedAddon.height;
}
- return -1;
+ return -1;
}
-
+
/**
* Allign bottom of the lifeline to the parent's one.
*
*/
public Command getAlignLifelineBottomToParentCommand(Command command, boolean ignoreDOS) {
- EObject element = ViewUtil.resolveSemanticElement((View)getModel());
+ EObject element = ViewUtil.resolveSemanticElement((View) getModel());
if (false == element instanceof Lifeline) {
return command;
}
@@ -1329,9 +1330,11 @@ public class CustomLifelineEditPart extends LifelineEditPart {
return command;
}
}
- }
+ }
ICommand cmd = new AbstractTransactionalCommand(getEditingDomain(), "Allign Lifeline bottom", null) {
protected int heightDelta = 0;
+
+ @Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
final int adjustedHeight = getAdjustedHeight();
final Bounds bounds = (Bounds) ((Shape) getModel()).getLayoutConstraint();
@@ -1409,7 +1412,7 @@ public class CustomLifelineEditPart extends LifelineEditPart {
/**
* This method automatically moves a lifeline according to the change of the size of the name and stereotypes container.
* This avoids the move of the dash line and its ES.
- * Also the dash line's height is adjusted (upon lifeline's creation)
+ * Also the dash line's height is adjusted (upon lifeline's creation)
*/
public void updateLifelinePosition() {
Bounds bounds = getBounds();
@@ -1442,10 +1445,14 @@ public class CustomLifelineEditPart extends LifelineEditPart {
*/
Dimension size = getPrimaryShape().getFigureLifelineNameContainerFigure().getPreferredSize(-1, oldNameContainerHeight);
if (!LifelineResizeHelper.isManualSize(this)) {
+ // If rect.width == -1, then we haven't yet computed the bounds
+ if (rect.width == -1) {
+ rect.width = updatedRect.width / 2;
+ }
if (size.width != rect.width) {
moveExecutionParts(new Dimension(size.width - rect.width, 0));
rect.width = size.width;
- rect.height = getAdjustedHeight();
+ rect.height = getAdjustedHeight();
updateLifelineBounds(rect);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
index c676a050516..e87961ea5a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/custom-src/org/eclipse/papyrus/uml/diagram/sequence/edit/policies/CustomDiagramDragDropEditPolicy.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009 CEA
+ * Copyright (c) 2009, 2015 CEA, Christian W. Damus, and others
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 433206
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.sequence.edit.policies;
@@ -64,12 +65,12 @@ import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.papyrus.commands.wrappers.CommandProxyWithResult;
-import org.eclipse.papyrus.uml.diagram.common.commands.DeferredCreateCommand;
import org.eclipse.papyrus.infra.gmfdiag.common.adapter.SemanticAdapter;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.common.commands.DeferredCreateCommand;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.CommonDiagramDragDropEditPolicy;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationConstraintHelper;
import org.eclipse.papyrus.uml.diagram.common.helper.DurationObservationHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateGateViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.CreateLocatedConnectionViewCommand;
import org.eclipse.papyrus.uml.diagram.sequence.command.RestoreDurationConstraintLinkCommand;
@@ -229,11 +230,9 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (someCombinedFragment && someNonCombinedFragment) {
// Can't Drop CombinedFragment and other nodes at the same time
return UnexecutableCommand.INSTANCE;
- }
- else if (someNonCombinedFragment) {
+ } else if (someNonCombinedFragment) {
return command;
- }
- else {
+ } else {
return getMoveCombinedFragmentCommand((ChangeBoundsRequest) request);
}
}
@@ -253,8 +252,7 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
if (editParts != null) {
for (Object part : editParts) {
CustomCombinedFragmentEditPart combinedFragmentEP = (CustomCombinedFragmentEditPart) part;
- CombinedFragment combinedFragment = (CombinedFragment) ViewUtil.
- resolveSemanticElement((View) ((IGraphicalEditPart) combinedFragmentEP).getModel());
+ CombinedFragment combinedFragment = (CombinedFragment) ViewUtil.resolveSemanticElement((View) ((IGraphicalEditPart) combinedFragmentEP).getModel());
if (combinedFragmentEP.getParent() == newParentEP) {
continue; // no change of the parent
@@ -1212,6 +1210,11 @@ public class CustomDiagramDragDropEditPolicy extends CommonDiagramDragDropEditPo
finishLocation = SequenceUtil.findLocationOfEvent(hostLifeline, finishEvent);
if (finishLocation == null) {
possibleFinishLocations = SequenceUtil.findPossibleLocationsForEvent(hostLifeline, finishEvent);
+
+ // Minimum shape (not just an horizontal line)
+ if (possibleFinishLocations.height <= 0) {
+ possibleFinishLocations.height = LifelineXYLayoutEditPolicy.EXECUTION_INIT_HEIGHT;
+ }
}
// find start and finish locations with correct y (start.y < finish.y) and proportions
if (startLocation == null) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
index 31b8593c533..bc418e0f77f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence/plugin.xml
@@ -1860,4 +1860,12 @@
<!-- optionally, specify keybindings -->
+
+ <extension
+ point="org.eclipse.papyrus.infra.gmfdiag.canonical.strategies">
+ <semanticChildrenStrategy
+ editPart="org.eclipse.papyrus.uml.diagram.sequence.edit.parts.LifelineEditPart"
+ class="org.eclipse.papyrus.uml.diagram.sequence.canonical.LifelineSemanticChildrenStrategy">
+ </semanticChildrenStrategy>
+ </extension>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath
index 2d1a4302f04..8a8f1668cdc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.project b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.project
index 1be698db2cd..1cba13b6edb 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.project
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.project
@@ -16,12 +16,22 @@
</arguments>
</buildCommand>
<buildCommand>
+ <name>org.eclipse.m2m.qvt.oml.project.QVTOBuilder</name>
+ <arguments>
+ <dictionary>
+ <key>src_container</key>
+ <value>transforms</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.m2m.qvt.oml.project.QVTONature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs
index 73da3815343..09308dbc127 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/.settings/org.eclipse.jdt.core.prefs
@@ -1,14 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/DeveloperDoc.html b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/DeveloperDoc.html
new file mode 100644
index 00000000000..52149b36ae7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/DeveloperDoc.html
@@ -0,0 +1 @@
+<html><link rel="stylesheet" href="default.css" type="text/css"><H1>Creation of a new Papyrus Wizard Framework</H1><P>The aim of this plugin is to improve the creation wizard of a new UML project or model. <BR/>For example a generic UML Diagram should not be stuck with a specified category <BR/> <BR/></P><H2>Requirements</H2><P>- Root Element Choice (id=Req001): <BR/> The wizard shall allow the user to specify the root element e.g. Package or Model</P><P>- Root Model Element Name (id=Req002): <BR/> Papyrus wizard shall enable to specify the name of the root element of the created model.</P><P>- Sash Editor Mode (id=req003): <BR/> Should be able to chose between legacy or "1.0" mode to serialize the sash model.</P><P>- Template Models (id=Req004): <BR/> Papyrus model creation wizard shall enable to load multiple template models. Currently, Papyrus model creation wizzard enable to load only template model even if checkboxes allow you to pick several.</P><P>- Profiled Model (id=Req005): <BR/> Papyrus model creation wizard shall select profiles to apply to the created model.</P><P>- Layout Requirement (id=req006): <BR/> The layout of wizard page when selecting the the diagram should be similar to the layout used in oep.infra.natable.comon.wizards.CreateNattableFromCatalogWizard.java</P><P>- Generic Model (id=req007): <BR/> Papyrus model creation wizard should to create a generic Ecore model.</P><P>- Customizable Wizard (id=req008): <BR/> The wizard should be easily customizable </P><P>- Project creation di name (id=req009): <BR/> the wizard shall allow to choose the name of the di/uml/notation files when we create a new project </P><P>- Diagram Name (id=req010): <BR/> Diagram name should be grayed out if any diagram are not selected</P><H2>Use Cases</H2><P align="middle"><img src="imgDOC/UseCaseDiagram.png" alt=UseCaseDiagram ></P><P align="middle">UseCaseDiagram</P><H3>Create new Profiled UML Project/Model</H3><P>A user create a new UML Project or Model with a profiled applied </P><H3>Create a new Generic Model</H3><P>A user should be able to create an Ecore Model</P><H3>Create a new UML Project/Model</H3><P>A user should be able to create a standard UML Project/Model</P><H3>Creation of UML Model/Project Test</H3><H2>Design</H2><P align="middle"><img src="imgDOC/Component_Diagram.png" alt=Component Diagram ></P><P align="middle">Component Diagram</P></html> \ No newline at end of file
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF
index e3637c8bb12..a0d502055fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/META-INF/MANIFEST.MF
@@ -1,10 +1,17 @@
Manifest-Version: 1.0
-Export-Package: org.eclipse.papyrus.uml.diagram.wizards,
+Export-Package: org.eclipse.papyrus.uml.diagram.wizards;uses:="org.eclipse.ui.plugin,org.osgi.framework,org.eclipse.papyrus.infra.core.log",
org.eclipse.papyrus.uml.diagram.wizards.category,
+ org.eclipse.papyrus.uml.diagram.wizards.command,
org.eclipse.papyrus.uml.diagram.wizards.kind,
+ org.eclipse.papyrus.uml.diagram.wizards.messages,
org.eclipse.papyrus.uml.diagram.wizards.pages,
- org.eclipse.papyrus.uml.diagram.wizards.utils
+ org.eclipse.papyrus.uml.diagram.wizards.providers,
+ org.eclipse.papyrus.uml.diagram.wizards.template,
+ org.eclipse.papyrus.uml.diagram.wizards.transformation,
+ org.eclipse.papyrus.uml.diagram.wizards.utils,
+ org.eclipse.papyrus.uml.diagram.wizards.wizards
Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.m2m.qvt.oml;bundle-version="3.4.0",
org.eclipse.emf.edit.ui;bundle-version="2.4.0",
org.eclipse.emf.ecore.edit;bundle-version="2.4.0",
org.eclipse.ui.intro;bundle-version="3.4.0",
@@ -22,7 +29,9 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.1.0",
org.eclipse.core.expressions;bundle-version="3.4.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.help;bundle-version="3.6.0"
Bundle-Vendor: %pluginProvider
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
@@ -30,7 +39,5 @@ Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.papyrus.uml.diagram.wizards.Activator
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.wizards;singleton
- :=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.wizards;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/build.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/build.properties
index d277fb55c5f..fad366a81c0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/build.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/build.properties
@@ -1,6 +1,13 @@
#
#Mon Sep 12 09:30:25 CEST 2011
-bin.includes=META-INF/,.,icons/,plugin.xml,schema/,plugin.properties,about.html,messages.properties
+bin.includes = META-INF/,\
+ .,\
+ icons/,\
+ plugin.xml,\
+ schema/,\
+ plugin.properties,\
+ about.html,\
+ src/org/eclipse/papyrus/uml/diagram/wizards/messages/messages.properties
output..=bin/
src.includes = about.html
source..=src/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/help/helpContext.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/help/helpContext.xml
new file mode 100644
index 00000000000..2e0c838ca38
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/help/helpContext.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<contexts>
+ <context id="FileChooser" title="Papyrus File Choose">
+ <description>You can choose where you want to create your new Papyrus model. The name should end with .di</description>
+ </context>
+ <context id="NewProject">
+ <description>You should set the name of the Papyrus project folder, and you can set the name of the file created</description>
+ </context>
+ <context id="Kind">
+ <description>You can select a diagram, set the name of the diagram, set the name of the root element of your model.
+You can also select one template to apply to your model</description>
+ </context>
+ <context id="Category">
+ <description>You should select the langage of your new diagram e.g. UML, Sysml, Profile, RobotML, ...</description>
+ </context>
+</contexts>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/checked.gif b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/checked.gif
new file mode 100644
index 00000000000..e556e7df3c7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/checked.gif
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/unchecked.gif b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/unchecked.gif
new file mode 100644
index 00000000000..342fa9de7e9
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/icons/unchecked.gif
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/ClassDiagram.png b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/ClassDiagram.png
new file mode 100644
index 00000000000..459ff682334
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/ClassDiagram.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/Component_Diagram.png b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/Component_Diagram.png
new file mode 100644
index 00000000000..d565860f3b3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/Component_Diagram.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/NewComponentDiagram.png b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/NewComponentDiagram.png
new file mode 100644
index 00000000000..5c0b8947790
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/NewComponentDiagram.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/UseCaseDiagram.png b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/UseCaseDiagram.png
new file mode 100644
index 00000000000..a0f1ee1952e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/imgDOC/UseCaseDiagram.png
Binary files differ
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.di b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.di
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.notation b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.notation
new file mode 100644
index 00000000000..6ed4abbf6a2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.notation
@@ -0,0 +1,818 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_mgTSKtRWEeOj2b7ZAwHgmA" type="PapyrusUMLClassDiagram" name="Overview" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_mgTSK9RWEeOj2b7ZAwHgmA" type="2005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSLNRWEeOj2b7ZAwHgmA" type="5020"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSLdRWEeOj2b7ZAwHgmA" type="7009">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mgTSLtRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSL9RWEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSMNRWEeOj2b7ZAwHgmA" x="201" y="38"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_mgTSMdRWEeOj2b7ZAwHgmA" type="2005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSMtRWEeOj2b7ZAwHgmA" type="5020"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSM9RWEeOj2b7ZAwHgmA" type="7009">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mgTSNNRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSNdRWEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSNtRWEeOj2b7ZAwHgmA" x="204" y="173"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_mgTSN9RWEeOj2b7ZAwHgmA" type="2005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSONRWEeOj2b7ZAwHgmA" type="5020"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSOdRWEeOj2b7ZAwHgmA" type="7009">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mgTSOtRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSO9RWEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSPNRWEeOj2b7ZAwHgmA" x="206" y="329"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_mgTSPdRWEeOj2b7ZAwHgmA" type="2005">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSPtRWEeOj2b7ZAwHgmA" type="5020"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSP9RWEeOj2b7ZAwHgmA" type="7009">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_mgTSQNRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSQdRWEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSGNRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_mgTSQtRWEeOj2b7ZAwHgmA" x="635" y="324"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_mgTSQ9RWEeOj2b7ZAwHgmA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_mgTSRNRWEeOj2b7ZAwHgmA">
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSENRWEeOj2b7ZAwHgmA"/>
+ <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#//@viewpoints.0/@modelKinds.1"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSENRWEeOj2b7ZAwHgmA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_mgTSRdRWEeOj2b7ZAwHgmA" type="4006" source="_mgTSMdRWEeOj2b7ZAwHgmA" target="_mgTSK9RWEeOj2b7ZAwHgmA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSRtRWEeOj2b7ZAwHgmA" visible="false" type="6014">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSR9RWEeOj2b7ZAwHgmA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSSNRWEeOj2b7ZAwHgmA" visible="false" type="6015">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSSdRWEeOj2b7ZAwHgmA" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_mgTSStRWEeOj2b7ZAwHgmA"/>
+ <element xmi:type="uml:Abstraction" href="model.uml#_mgTSFNRWEeOj2b7ZAwHgmA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mgTSS9RWEeOj2b7ZAwHgmA" points="[-2, -10, 8, 48]$[-27, -45, -17, 13]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSTNRWEeOj2b7ZAwHgmA" id="(0.305,0.1)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSTdRWEeOj2b7ZAwHgmA" id="(0.27,0.87)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_mgTSTtRWEeOj2b7ZAwHgmA" type="4006" source="_mgTSN9RWEeOj2b7ZAwHgmA" target="_mgTSMdRWEeOj2b7ZAwHgmA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTST9RWEeOj2b7ZAwHgmA" visible="false" type="6014">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSUNRWEeOj2b7ZAwHgmA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSUdRWEeOj2b7ZAwHgmA" visible="false" type="6015">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSUtRWEeOj2b7ZAwHgmA" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_mgTSU9RWEeOj2b7ZAwHgmA"/>
+ <element xmi:type="uml:Abstraction" href="model.uml#_mgTSF9RWEeOj2b7ZAwHgmA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mgTSVNRWEeOj2b7ZAwHgmA" points="[-9, -16, 0, 67]$[-24, -72, -15, 11]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSVdRWEeOj2b7ZAwHgmA" id="(0.27,0.16)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSVtRWEeOj2b7ZAwHgmA" id="(0.235,0.89)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_mgTSV9RWEeOj2b7ZAwHgmA" type="4008" source="_mgTSPdRWEeOj2b7ZAwHgmA" target="_mgTSMdRWEeOj2b7ZAwHgmA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSWNRWEeOj2b7ZAwHgmA" visible="false" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSWdRWEeOj2b7ZAwHgmA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSWtRWEeOj2b7ZAwHgmA" visible="false" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSW9RWEeOj2b7ZAwHgmA" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_mgTSXNRWEeOj2b7ZAwHgmA"/>
+ <element xmi:type="uml:Dependency" href="model.uml#_mgTSGdRWEeOj2b7ZAwHgmA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mgTSXdRWEeOj2b7ZAwHgmA" points="[-46, -20, 265, 113]$[-275, -135, 36, -2]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSXtRWEeOj2b7ZAwHgmA" id="(0.0,0.24)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgTSX9RWEeOj2b7ZAwHgmA" id="(1.0,0.65)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_mgTSYNRWEeOj2b7ZAwHgmA" type="4008" source="_mgTSPdRWEeOj2b7ZAwHgmA" target="_mgTSN9RWEeOj2b7ZAwHgmA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSYdRWEeOj2b7ZAwHgmA" visible="false" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgTSYtRWEeOj2b7ZAwHgmA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_mgTSY9RWEeOj2b7ZAwHgmA" visible="false" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_mgT5INRWEeOj2b7ZAwHgmA" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_mgT5IdRWEeOj2b7ZAwHgmA"/>
+ <element xmi:type="uml:Dependency" href="model.uml#_mgTSGtRWEeOj2b7ZAwHgmA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_mgT5ItRWEeOj2b7ZAwHgmA" points="[-40, 1, 262, -12]$[-267, 20, 35, 7]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgT5I9RWEeOj2b7ZAwHgmA" id="(0.0,0.69)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_mgT5JNRWEeOj2b7ZAwHgmA" id="(1.0,0.64)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_91IqgNRWEeOj2b7ZAwHgmA" type="UseCase" name="UseCaseDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_-nt-ANRWEeOj2b7ZAwHgmA" type="2015">
+ <children xmi:type="notation:DecorationNode" xmi:id="_-nxBUNRWEeOj2b7ZAwHgmA" type="5019"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-nxoYNRWEeOj2b7ZAwHgmA" type="7011">
+ <children xmi:type="notation:Shape" xmi:id="_NKWEgNRYEeOj2b7ZAwHgmA" type="3009">
+ <children xmi:type="notation:DecorationNode" xmi:id="_NKWrkNRYEeOj2b7ZAwHgmA" type="5018"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_NKXSoNRYEeOj2b7ZAwHgmA" type="7012">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_NKXSodRYEeOj2b7ZAwHgmA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_NKXSotRYEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NKXSo9RYEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:UseCase" href="model.uml#_NKToQNRYEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NKWEgdRYEeOj2b7ZAwHgmA" x="84" y="118"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fsdbMNRgEeOYNryRxL8wIQ" type="3009">
+ <children xmi:type="notation:DecorationNode" xmi:id="_fseCQNRgEeOYNryRxL8wIQ" type="5018"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fsepUNRgEeOYNryRxL8wIQ" type="7012">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fsepUdRgEeOYNryRxL8wIQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fsepUtRgEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fsepU9RgEeOYNryRxL8wIQ"/>
+ </children>
+ <element xmi:type="uml:UseCase" href="model.uml#_fsVfYNRgEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fsdbMdRgEeOYNryRxL8wIQ" x="148" y="249"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GriVENW4EeOXn9fE7v0z7Q" type="3009">
+ <children xmi:type="notation:DecorationNode" xmi:id="_GrjjMNW4EeOXn9fE7v0z7Q" type="5018"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_GrkKQNW4EeOXn9fE7v0z7Q" type="7012">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_GrkKQdW4EeOXn9fE7v0z7Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_GrkKQtW4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GrkKQ9W4EeOXn9fE7v0z7Q"/>
+ </children>
+ <element xmi:type="uml:UseCase" href="model.uml#_GrEbANW4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GriVEdW4EeOXn9fE7v0z7Q" x="101" y="32"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-nxoYdRWEeOj2b7ZAwHgmA"/>
+ </children>
+ <element xmi:type="uml:Component" href="model.uml#_mgTSFdRWEeOj2b7ZAwHgmA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-nulENRWEeOj2b7ZAwHgmA" x="572" y="42" width="475" height="437"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_yeGHgNRbEeOYNryRxL8wIQ" type="2011">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yeIjwNRbEeOYNryRxL8wIQ" type="5014">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yeJK0NRbEeOYNryRxL8wIQ" x="-5" y="65"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yeJK0dRbEeOYNryRxL8wIQ" type="6029">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yeJx4NRbEeOYNryRxL8wIQ" x="20" y="100"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yeJx4dRbEeOYNryRxL8wIQ" type="6037">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yeJx4tRbEeOYNryRxL8wIQ" x="20" y="80"/>
+ </children>
+ <element xmi:type="uml:Actor" href="model.uml#_ycV0ANRbEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yeGHgdRbEeOYNryRxL8wIQ" x="418" y="175"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_91IqgdRWEeOj2b7ZAwHgmA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_91IqgtRWEeOj2b7ZAwHgmA">
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_jRgMENRcEeOYNryRxL8wIQ" type="4011" source="_yeGHgNRbEeOYNryRxL8wIQ" target="_NKWEgNRYEeOj2b7ZAwHgmA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jRgzINRcEeOYNryRxL8wIQ" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jRhaMNRcEeOYNryRxL8wIQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_jRiBQNRcEeOYNryRxL8wIQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jRioUNRcEeOYNryRxL8wIQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_jRgMEdRcEeOYNryRxL8wIQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_jRchsNRcEeOYNryRxL8wIQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jRgMEtRcEeOYNryRxL8wIQ" points="[15, -2, -382, -6]$[237, -2, -160, -6]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iDo1UNRdEeOYNryRxL8wIQ" id="(1.0,0.56)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iDpcYNRdEeOYNryRxL8wIQ" id="(0.0,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_jJAakNRgEeOYNryRxL8wIQ" type="4011" source="_yeGHgNRbEeOYNryRxL8wIQ" target="_fsdbMNRgEeOYNryRxL8wIQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jJBosNRgEeOYNryRxL8wIQ" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jJBosdRgEeOYNryRxL8wIQ" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_jJCPwNRgEeOYNryRxL8wIQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_jJC20NRgEeOYNryRxL8wIQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_jJAakdRgEeOYNryRxL8wIQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_jI9XQNRgEeOYNryRxL8wIQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jJAaktRgEeOYNryRxL8wIQ" points="[15, 5, -372, -127]$[300, 141, -87, 9]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_l5VNINRgEeOYNryRxL8wIQ" id="(0.14942528735632185,0.6666666666666666)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_LHsXUNW4EeOXn9fE7v0z7Q" type="4011" source="_yeGHgNRbEeOYNryRxL8wIQ" target="_GriVENW4EeOXn9fE7v0z7Q">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LHuMgNW4EeOXn9fE7v0z7Q" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LHuzkNW4EeOXn9fE7v0z7Q" x="-87" y="-80"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LHvaoNW4EeOXn9fE7v0z7Q" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LHwBsNW4EeOXn9fE7v0z7Q" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_LHsXUdW4EeOXn9fE7v0z7Q"/>
+ <element xmi:type="uml:Association" href="model.uml#_LHT80NW4EeOXn9fE7v0z7Q"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LHsXUtW4EeOXn9fE7v0z7Q" points="[15, -5, -252, 70]$[245, -77, -22, -2]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LH6ZwNW4EeOXn9fE7v0z7Q" id="(0.08088235294117647,0.38333333333333336)"/>
+ </edges>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_k47ZsNRYEeOj2b7ZAwHgmA" name="RequirementTable" currentRowAxisProvider="_k47ZtdRYEeOj2b7ZAwHgmA" currentColumnAxisProvider="_k47ZsdRYEeOj2b7ZAwHgmA">
+ <context xmi:type="uml:Model" href="model.uml#_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#//@viewpoints.0/@modelKinds.26"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_k47ZsdRYEeOj2b7ZAwHgmA" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_k47ZstRYEeOj2b7ZAwHgmA" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_k47Zs9RYEeOj2b7ZAwHgmA">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_k47ZtNRYEeOj2b7ZAwHgmA" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_k47ZtdRYEeOj2b7ZAwHgmA" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+ <localRowHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_vtWwINRZEeOj2b7ZAwHgmA" indexStyle="NUMERIC" displayIndex="false"/>
+ <localColumnHeaderAxisConfiguration xmi:type="nattableaxisconfiguration:LocalTableHeaderAxisConfiguration" xmi:id="_sL8e4NRZEeOj2b7ZAwHgmA" displayLabel="false"/>
+ </nattable:Table>
+ <notation:Diagram xmi:id="_of0xcNRkEeOYNryRxL8wIQ" type="PapyrusUMLComponentDiagram" name="Component Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_pxnwgNRkEeOYNryRxL8wIQ" type="2002">
+ <children xmi:type="notation:DecorationNode" xmi:id="_pxo-oNRkEeOYNryRxL8wIQ" type="5004"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pxplsNRkEeOYNryRxL8wIQ" type="7001">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pxplsdRkEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pxplstRkEeOYNryRxL8wIQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_pyc28NRkEeOYNryRxL8wIQ" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_pyc28dRkEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pyc28tRkEeOYNryRxL8wIQ"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_qzvU0NRkEeOYNryRxL8wIQ" type="3069">
+ <children xmi:type="notation:DecorationNode" xmi:id="_qzv74NRkEeOYNryRxL8wIQ" visible="false" type="5006">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qzv74dRkEeOYNryRxL8wIQ" x="-83" y="37"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qzxKANRkEeOYNryRxL8wIQ" type="5007">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qzxKAdRkEeOYNryRxL8wIQ" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_qx_BUNRkEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qzvU0dRkEeOYNryRxL8wIQ" x="-10" y="47" width="20" height="20"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_pxnwgdRkEeOYNryRxL8wIQ"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_pxnwgtRkEeOYNryRxL8wIQ"/>
+ <element xmi:type="uml:Component" href="model.uml#_pv1n0NRkEeOYNryRxL8wIQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pxnwg9RkEeOYNryRxL8wIQ" x="661" y="217" width="195" height="85"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_p9qvwNUlEeOXn9fE7v0z7Q" type="2002">
+ <children xmi:type="notation:DecorationNode" xmi:id="_p9rW0NUlEeOXn9fE7v0z7Q" type="5004"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_p9r94NUlEeOXn9fE7v0z7Q" type="7001">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_p9r94dUlEeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p9r94tUlEeOXn9fE7v0z7Q"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_p9voQNUlEeOXn9fE7v0z7Q" type="compartment_shape_display">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_p9voQdUlEeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p9voQtUlEeOXn9fE7v0z7Q"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ySMxwNUlEeOXn9fE7v0z7Q" type="3069">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ySMxwtUlEeOXn9fE7v0z7Q" type="5006">
+ <styles xmi:type="notation:StringListValueStyle" xmi:id="_1eOB0NUlEeOXn9fE7v0z7Q" name="maskLabel">
+ <stringListValue>visibility</stringListValue>
+ <stringListValue>name</stringListValue>
+ <stringListValue>derived</stringListValue>
+ <stringListValue>conjugated</stringListValue>
+ </styles>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ySNY0NUlEeOXn9fE7v0z7Q" x="-154" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ySN_4NUlEeOXn9fE7v0z7Q" type="5007">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ySN_4dUlEeOXn9fE7v0z7Q" x="25" y="-10"/>
+ </children>
+ <element xmi:type="uml:Port" href="model.uml#_yQgIoNUlEeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ySMxwdUlEeOXn9fE7v0z7Q" x="165" y="49" width="20" height="20"/>
+ </children>
+ <styles xmi:type="notation:DescriptionStyle" xmi:id="_p9qvwdUlEeOXn9fE7v0z7Q"/>
+ <styles xmi:type="notation:FontStyle" xmi:id="_p9qvwtUlEeOXn9fE7v0z7Q"/>
+ <element xmi:type="uml:Component" href="model.uml#_p7NRoNUlEeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_p9qvw9UlEeOXn9fE7v0z7Q" x="280" y="217" height="81"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_of0xcdRkEeOYNryRxL8wIQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_of0xctRkEeOYNryRxL8wIQ">
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_KWZKkNUmEeOXn9fE7v0z7Q" type="4010" source="_qzvU0NRkEeOYNryRxL8wIQ" target="_ySMxwNUlEeOXn9fE7v0z7Q">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KWaYsNUmEeOXn9fE7v0z7Q" visible="false" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KWaYsdUmEeOXn9fE7v0z7Q" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KWa_wNUmEeOXn9fE7v0z7Q" type="6023">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KWbm0NUmEeOXn9fE7v0z7Q" y="60"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KWZKkdUmEeOXn9fE7v0z7Q"/>
+ <element xmi:type="uml:Dependency" href="model.uml#_KWUSENUmEeOXn9fE7v0z7Q"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KWZKktUmEeOXn9fE7v0z7Q" points="[-10, 7, 196, -1]$[-204, -2, 2, -10]"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_1U934NRkEeOYNryRxL8wIQ"/>
+ <notation:Diagram xmi:id="_CRrY4NW4EeOXn9fE7v0z7Q" type="UseCase" name="UseCaseTestDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_Rw2coNW4EeOXn9fE7v0z7Q" type="2013">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Rw3DsNW4EeOXn9fE7v0z7Q" type="5016"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Rw3qwNW4EeOXn9fE7v0z7Q" type="7009">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Rw3qwdW4EeOXn9fE7v0z7Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Rw3qwtW4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rw3qw9W4EeOXn9fE7v0z7Q"/>
+ </children>
+ <element xmi:type="uml:UseCase" href="model.uml#_GrEbANW4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Rw2codW4EeOXn9fE7v0z7Q" x="646" y="175"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SQEvQNW4EeOXn9fE7v0z7Q" type="2013">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SQFWUNW4EeOXn9fE7v0z7Q" type="5016"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SQFWUdW4EeOXn9fE7v0z7Q" type="7009">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SQFWUtW4EeOXn9fE7v0z7Q"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SQFWU9W4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SQFWVNW4EeOXn9fE7v0z7Q"/>
+ </children>
+ <element xmi:type="uml:UseCase" href="model.uml#_SQDhINW4EeOXn9fE7v0z7Q"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SQEvQdW4EeOXn9fE7v0z7Q" x="215" y="181"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_CRrY4dW4EeOXn9fE7v0z7Q"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_CRrY4tW4EeOXn9fE7v0z7Q">
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_omLOkNW4EeOXn9fE7v0z7Q" type="4011" source="_SQEvQNW4EeOXn9fE7v0z7Q" target="_Rw2coNW4EeOXn9fE7v0z7Q">
+ <children xmi:type="notation:DecorationNode" xmi:id="_omMcsNW4EeOXn9fE7v0z7Q" visible="false" type="6008">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_omMcsdW4EeOXn9fE7v0z7Q" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_omNDwNW4EeOXn9fE7v0z7Q" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_omNq0NW4EeOXn9fE7v0z7Q" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_omLOkdW4EeOXn9fE7v0z7Q"/>
+ <element xmi:type="uml:Association" href="model.uml#_omILQNW4EeOXn9fE7v0z7Q"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_omLOktW4EeOXn9fE7v0z7Q" points="[42, -4, -118, 10]$[143, -14, -17, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_omW0wNW4EeOXn9fE7v0z7Q" id="(1.0,0.6333333333333333)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_omXb0NW4EeOXn9fE7v0z7Q" id="(0.0,0.48333333333333334)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_ASVhcN_3EeOXk88MU6upww" type="PapyrusUMLActivityDiagram" name="ActivityDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ASVhcd_3EeOXk88MU6upww" type="2001">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ASVhct_3EeOXk88MU6upww" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ASVhdN_3EeOXk88MU6upww" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ASVhdd_3EeOXk88MU6upww"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ASVhdt_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ASVhd9_3EeOXk88MU6upww"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ASVheN_3EeOXk88MU6upww" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ASVhed_3EeOXk88MU6upww"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ASVhet_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ASVhe9_3EeOXk88MU6upww"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ASVhfN_3EeOXk88MU6upww" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ASVhfd_3EeOXk88MU6upww"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ASVhft_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ASVhf9_3EeOXk88MU6upww"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ASVhgN_3EeOXk88MU6upww" type="7004">
+ <children xmi:type="notation:Shape" xmi:id="_DhOfUN_3EeOXk88MU6upww" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DhPGYN_3EeOXk88MU6upww" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_DhPGYd_3EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_DhOfUd_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:InitialNode" href="model.uml#_DbviYN_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DhOfUt_3EeOXk88MU6upww" x="249" y="4"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_RHW90N_3EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_RHXk4N_3EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_RHW90d_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_RHSsYN_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RHW90t_3EeOXk88MU6upww" x="158" y="93"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fyqUoN_3EeOXk88MU6upww" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_fyq7sN_3EeOXk88MU6upww" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_fyriwN_3EeOXk88MU6upww" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fysJ0N_3EeOXk88MU6upww" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_fysJ0d_3EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_fyqUod_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:DecisionNode" href="model.uml#_fxeB0N_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fyqUot_3EeOXk88MU6upww" x="213" y="169"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_i-JZMN_3EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_i-KAQN_3EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_i-JZMd_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_i-Fu0N_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_i-JZMt_3EeOXk88MU6upww" x="7" y="206" height="38"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_lwC5EN_3EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_lwC5E9_3EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_lwC5Ed_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_lwAc0N_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lwC5Et_3EeOXk88MU6upww" x="350" y="221"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_OAOYUN_4EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_OAO_YN_4EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_OAOYUd_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_OAKG4N_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OAOYUt_4EeOXk88MU6upww" x="167" y="457"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_QbncsN_4EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_QboDwN_4EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_Qbncsd_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_QbjyUN_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qbncst_4EeOXk88MU6upww" x="157" y="367"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_YFbGsN_4EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_YFbtwN_4EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_YFbGsd_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_YFXcUN_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YFbGst_4EeOXk88MU6upww" x="185" y="610"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_cf68EN_4EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_cf7jIN_4EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_cf68Ed_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_cf34wN_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cf68Et_4EeOXk88MU6upww" x="167" y="706"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_7so2wN_4EeOXk88MU6upww" type="3039">
+ <children xmi:type="notation:DecorationNode" xmi:id="_7spd0N_4EeOXk88MU6upww" type="5099">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_7spd0d_4EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_7so2wd_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:MergeNode" href="model.uml#_7sklUN_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7so2wt_4EeOXk88MU6upww" x="214" y="294"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="__s8qgN_4EeOXk88MU6upww" type="3005">
+ <children xmi:type="notation:DecorationNode" xmi:id="__s9RkN_4EeOXk88MU6upww" type="5081">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="__s9Rkd_4EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="__s8qgd_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:ActivityFinalNode" href="model.uml#__s5nMN_4EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="__s8qgt_4EeOXk88MU6upww" x="633" y="697"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_oAj4QN_5EeOXk88MU6upww" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_oAkfUN_5EeOXk88MU6upww" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oAkfUd_5EeOXk88MU6upww" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oAkfUt_5EeOXk88MU6upww" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oAlGYN_5EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_oAj4Qd_5EeOXk88MU6upww"/>
+ <element xmi:type="uml:DecisionNode" href="model.uml#_oAeYsN_5EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oAj4Qt_5EeOXk88MU6upww" x="215" y="535"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_DmbBAN_6EeOXk88MU6upww" type="3007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DmboEN_6EeOXk88MU6upww" type="5003"/>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_DmbBAd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:OpaqueAction" href="model.uml#_DmYkwN_6EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DmbBAt_6EeOXk88MU6upww" x="480" y="685"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_GQurIN_6EeOXk88MU6upww" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_GQvSMN_6EeOXk88MU6upww" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_GQvSMd_6EeOXk88MU6upww" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_GQvSMt_6EeOXk88MU6upww" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_GQv5QN_6EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_GQurId_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:DecisionNode" href="model.uml#_GQqZsN_6EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_GQurIt_6EeOXk88MU6upww" x="73" y="645"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ITHZoN_6EeOXk88MU6upww" type="3038">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ITIAsN_6EeOXk88MU6upww" type="5043">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ITIAsd_6EeOXk88MU6upww" y="5"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ITInwN_6EeOXk88MU6upww" type="5098">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ITInwd_6EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_ITHZod_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:DecisionNode" href="model.uml#_ITDIMN_6EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ITHZot_6EeOXk88MU6upww" x="399" y="689"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_r9DGgN_6EeOXk88MU6upww" type="3004">
+ <children xmi:type="notation:DecorationNode" xmi:id="_r9DGg9_6EeOXk88MU6upww" type="5080">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_r9DtkN_6EeOXk88MU6upww" y="5"/>
+ </children>
+ <styles xmi:type="notation:HintedDiagramLinkStyle" xmi:id="_r9DGgd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:InitialNode" href="model.uml#_r9AqQN_6EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_r9DGgt_6EeOXk88MU6upww" x="467" y="32"/>
+ </children>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ASVhgd_3EeOXk88MU6upww"/>
+ </children>
+ <element xmi:type="uml:Activity" href="model.uml#_AACQgN_3EeOXk88MU6upww"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ASVhgt_3EeOXk88MU6upww"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ASVhg9_3EeOXk88MU6upww"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ASVhhN_3EeOXk88MU6upww">
+ <owner xmi:type="uml:Model" href="model.uml#_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ </styles>
+ <element xmi:type="uml:Activity" href="model.uml#_AACQgN_3EeOXk88MU6upww"/>
+ <edges xmi:type="notation:Connector" xmi:id="_p4DQQN_3EeOXk88MU6upww" type="4004" source="_DhOfUN_3EeOXk88MU6upww" target="_RHW90N_3EeOXk88MU6upww" routing="Rectilinear" avoidObstructions="true">
+ <children xmi:type="notation:DecorationNode" xmi:id="_p4D3UN_3EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_p4EeYN_3EeOXk88MU6upww" x="-46" y="68"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_p4EeYd_3EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_p4EeYt_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_p4FFcN_3EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_p4FFcd_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_p4FFct_3EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_p4FsgN_3EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_p4DQQd_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_p3Ow4N_3EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_p4DQQt_3EeOXk88MU6upww" points="[-2, 6, 13, -57]$[-14, 6, 1, -57]$[-14, 58, 1, -5]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p4sJcN_3EeOXk88MU6upww" id="(0.15,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_p4swgN_3EeOXk88MU6upww" id="(0.41379310344827586,0.05)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_vvpVwN_3EeOXk88MU6upww" type="4004" source="_RHW90N_3EeOXk88MU6upww" target="_fyqUoN_3EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_vvp80N_3EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vvp80d_3EeOXk88MU6upww" x="-33" y="50"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_vvqj4N_3EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vvqj4d_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_vvrK8N_3EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vvrK8d_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_vvryAN_3EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vvryAd_3EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_vvpVwd_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_vvT-kN_3EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_vvpVwt_3EeOXk88MU6upww" points="[26, 25, -47, -45]$[76, 86, 3, 16]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_xTd48N_3EeOXk88MU6upww" type="4004" source="_fyqUoN_3EeOXk88MU6upww" target="_i-JZMN_3EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_xTfHEN_3EeOXk88MU6upww" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_xTfHEd_3EeOXk88MU6upww" x="-20" y="16"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xTfuIN_3EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_xTfuId_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xTgVMN_3EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_xTgVMd_3EeOXk88MU6upww" x="13" y="21"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_xTg8QN_3EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_xTg8Qd_3EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_xTd48d_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_xTMMIN_3EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xTd48t_3EeOXk88MU6upww" points="[-2, 1, 102, -73]$[-110, 97, -6, 23]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xTqtQN_3EeOXk88MU6upww" id="(0.3,0.6666666666666666)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_yAORQN_3EeOXk88MU6upww" type="4004" source="_fyqUoN_3EeOXk88MU6upww" target="_lwC5EN_3EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yAO4UN_3EeOXk88MU6upww" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yAO4Ud_3EeOXk88MU6upww" x="-27" y="-24"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yAPfYN_3EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yAPfYd_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yAPfYt_3EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yAQGcN_3EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yAQGcd_3EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yAQGct_3EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_yAORQd_3EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_x_9ykN_3EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yAORQt_3EeOXk88MU6upww" points="[8, 2, -168, -53]$[112, 35, -64, -20]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_04JEIN_4EeOXk88MU6upww" type="4004" source="_QbncsN_4EeOXk88MU6upww" target="_OAOYUN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_04KSQN_4EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_04KSQd_4EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_04K5UN_4EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_04LgYN_4EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_04MHcN_4EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_04MHcd_4EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_04MugN_4EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_04Mugd_4EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_04JEId_4EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_03-sEN_4EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_04JEIt_4EeOXk88MU6upww" points="[-20, 25, 84, -106]$[-109, 156, -5, 25]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_1xZK4N_5EeOXk88MU6upww" type="4004" source="_i-JZMN_3EeOXk88MU6upww" target="_7so2wN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1xZx8N_5EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1xZx8d_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1xZx8t_5EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1xaZAN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1xaZAd_5EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1xaZAt_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1xbAEN_5EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1xbAEd_5EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_1xZK4d_5EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_1xTrUN_5EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1xZK4t_5EeOXk88MU6upww" points="[27, 23, -91, -73]$[115, 110, -3, 14]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_7GBGMN_5EeOXk88MU6upww" type="4004" source="_7so2wN_4EeOXk88MU6upww" target="_QbncsN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_7GBtQN_5EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_7GCUUN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_7GCUUd_5EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_7GC7YN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_7GC7Yd_5EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_7GDicN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_7GDicd_5EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_7GEJgN_5EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_7GBGMd_5EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_7F2HEN_5EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7GBGMt_5EeOXk88MU6upww" points="[-2, 16, -8, -63]$[-2, 104, -8, 25]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_8geSAN_5EeOXk88MU6upww" type="4004" source="_lwC5EN_3EeOXk88MU6upww" target="_7so2wN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_8ge5EN_5EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8gfgIN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8gfgId_5EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8ggHMN_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8ggHMd_5EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8ggHMt_5EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8gguQN_5EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_8gguQd_5EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_8geSAd_5EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_8gVvIN_5EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8geSAt_5EeOXk88MU6upww" points="[-23, 11, 127, -65]$[-151, 59, -1, -17]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8gqfQN_5EeOXk88MU6upww" id="(0.19230769230769232,0.775)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_KADckN_6EeOXk88MU6upww" type="4004" source="_OAOYUN_4EeOXk88MU6upww" target="_oAj4QN_5EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KAEqsN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KAEqsd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KAFRwN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KAF40N_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KAF40d_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KAGf4N_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_KAHG8N_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KAHG8d_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_KADckd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_J_0zEN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KADckt_6EeOXk88MU6upww" points="[3, 25, -1, -67]$[3, 108, -1, 16]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_LiuwQN_6EeOXk88MU6upww" type="4004" source="_oAj4QN_5EeOXk88MU6upww" target="_ITHZoN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_LivXUN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_LivXUd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LivXUt_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Liv-YN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Liv-Yd_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Liv-Yt_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_LiwlcN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Liwlcd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_LiuwQd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_LilmUN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LiuwQt_6EeOXk88MU6upww" points="[15, 12, -222, -185]$[236, 181, -1, -16]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Li5IUN_6EeOXk88MU6upww" id="(0.2,0.36666666666666664)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Mh9_sN_6EeOXk88MU6upww" type="4004" source="_oAj4QN_5EeOXk88MU6upww" target="_YFbGsN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Mh-mwN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Mh_N0N_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Mh_04N_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Mh_04d_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MiAb8N_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MiBDAN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MiBqEN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_MiBqEd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_Mh9_sd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_Mh35EN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Mh9_st_6EeOXk88MU6upww" points="[-2, 3, -2, -69]$[-2, 47, -2, -25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_MiMCIN_6EeOXk88MU6upww" id="(0.25,0.6)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_NoC28N_6EeOXk88MU6upww" type="4004" source="_oAj4QN_5EeOXk88MU6upww" target="_GQurIN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_NoEFEN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_NoEFEd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_NoEsIN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_NoEsId_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_NoFTMN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_NoF6QN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_NoGhUN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_NoGhUd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_NoC28d_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_Nn00gN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_NoC28t_6EeOXk88MU6upww" points="[5, 11, 1, -127]$[5, 151, 1, 13]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NoRgcN_6EeOXk88MU6upww" id="(0.25,0.6333333333333333)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NoRgcd_6EeOXk88MU6upww" id="(0.3,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_SbmFgN_6EeOXk88MU6upww" type="4004" source="_YFbGsN_4EeOXk88MU6upww" target="_GQurIN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SbmskN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Sbmskd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SbnToN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SbnTod_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Sbn6sN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Sbn6sd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Sbn6st_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SbohwN_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_SbmFgd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_SbVm0N_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_SbmFgt_6EeOXk88MU6upww" points="[-54, 12, 104, -21]$[-155, 49, 3, 16]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_VUwrAN_6EeOXk88MU6upww" type="4004" source="_GQurIN_6EeOXk88MU6upww" target="_cf68EN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_VUxSEN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VUxSEd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_VUx5IN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VUx5Id_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_VUygMN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VUygMd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_VUygMt_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VUygM9_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_VUwrAd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_VTxMgN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_VUwrAt_6EeOXk88MU6upww" points="[9, 6, -140, -81]$[159, 112, 10, 25]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_XWD0YN_6EeOXk88MU6upww" type="4004" source="_cf68EN_4EeOXk88MU6upww" target="_ITHZoN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_XWD0Y9_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XWEbcN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_XWEbcd_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XWEbct_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_XWFCgN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XWFCgd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_XWFpkN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XWFpkd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_XWD0Yd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_XVBSkN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_XWD0Yt_6EeOXk88MU6upww" points="[25, -4, -167, 26]$[192, -48, 0, -18]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_XWM-UN_6EeOXk88MU6upww" id="(0.8148148148148148,0.55)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_ZLo18N_6EeOXk88MU6upww" type="4004" source="_YFbGsN_4EeOXk88MU6upww" target="_ITHZoN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZLpdAN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZLqEEN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZLqrIN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZLqrId_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZLrSMN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZLr5QN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ZLr5Qd_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZLsgUN_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ZLo18d_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_ZLbakN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ZLo18t_6EeOXk88MU6upww" points="[30, 12, -184, -67]$[216, 96, 2, 17]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ZL2RUN_6EeOXk88MU6upww" id="(0.6091954022988506,0.775)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_bKa20N_6EeOXk88MU6upww" type="4004" source="_ITHZoN_6EeOXk88MU6upww" target="_DmbBAN_6EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKcE8N_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKcE8d_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKcsAN_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKcsAd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKdTEN_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKd6IN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_bKfIQN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_bKfIQd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_bKa20d_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_bKOpkN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bKa20t_6EeOXk88MU6upww" points="[9, -5, -132, -6]$[144, -24, 3, -25]"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_cSeEAN_6EeOXk88MU6upww" type="4004" source="_DmbBAN_6EeOXk88MU6upww" target="__s8qgN_4EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_cSerEN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cSerEd_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_cSerEt_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cSfSIN_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_cSfSId_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cSfSIt_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_cSf5MN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_cSf5Md_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_cSeEAd_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_cSX9YN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_cSeEAt_6EeOXk88MU6upww" points="[15, 0, -99, 2]$[113, 10, -1, 12]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_cSnN8N_6EeOXk88MU6upww" id="(0.8571428571428571,0.6)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_yxxioN_6EeOXk88MU6upww" type="4004" source="_r9DGgN_6EeOXk88MU6upww" target="_lwC5EN_3EeOXk88MU6upww">
+ <children xmi:type="notation:DecorationNode" xmi:id="_yxywwN_6EeOXk88MU6upww" visible="false" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yxywwd_6EeOXk88MU6upww" x="-75" y="32"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yxzX0N_6EeOXk88MU6upww" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yxzX0d_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yxz-4N_6EeOXk88MU6upww" type="6009">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yx0l8N_6EeOXk88MU6upww" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_yx1NAN_6EeOXk88MU6upww" type="6011">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_yx1NAd_6EeOXk88MU6upww" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_yxxiod_6EeOXk88MU6upww"/>
+ <element xmi:type="uml:ControlFlow" href="model.uml#_yxnKkN_6EeOXk88MU6upww"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yxxiot_6EeOXk88MU6upww" points="[-4, 11, 93, -235]$[-95, 271, 2, 25]"/>
+ </edges>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.uml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.uml
new file mode 100644
index 00000000000..cb7e7aa3ed2
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/model/model.uml
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Document="http:///schemas/Document/_qR4REMn0EeO9CYUoXDRplw/0" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:structure="http://DeveloperProcess/schemas/structure/_VA9p4McPEeO9CYUoXDRplw/1" xmlns:trace="http://DeveloperProcess/schemas/trace/_VBAtMMcPEeO9CYUoXDRplw/1" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/Document/_qR4REMn0EeO9CYUoXDRplw/0 pathmap://DEVELOPER_PROFILES/Document.profile.uml#_qR44IMn0EeO9CYUoXDRplw http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements http://DeveloperProcess/schemas/structure/_VA9p4McPEeO9CYUoXDRplw/1 pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_VA-4AMcPEeO9CYUoXDRplw http://DeveloperProcess/schemas/trace/_VBAtMMcPEeO9CYUoXDRplw/1 pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_VBAtMccPEeO9CYUoXDRplw">
+ <uml:Model xmi:id="_mgTSENRWEeOj2b7ZAwHgmA" name="Papyrus Wizard">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_kp8NINT1EeOYNryRxL8wIQ" annotatedElement="_mgTSENRWEeOj2b7ZAwHgmA">
+ <body>The aim of this plugin is to improve the creation wizard of a new UML project or model.&#xD;
+For example a generic UML Diagram should not be stuck with a specified category &#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_mgTSEdRWEeOj2b7ZAwHgmA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Model" xmi:id="_mgTSEtRWEeOj2b7ZAwHgmA" name="Requirements">
+ <packagedElement xmi:type="uml:Class" xmi:id="_oRxaQNRXEeOj2b7ZAwHgmA" name="Root Element Choice "/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_FkAv0NRZEeOj2b7ZAwHgmA" name="Root Model Element Name"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_Dbc5INRfEeOYNryRxL8wIQ" name="Sash Editor Mode"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_cx1SkNRfEeOYNryRxL8wIQ" name="Template Models"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-fop8NRfEeOYNryRxL8wIQ" name="Profiled Model"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ZzGuANUXEeOXn9fE7v0z7Q" name="Layout Requirement"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_pfTUkNUsEeOXn9fE7v0z7Q" name="Generic Model"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_2fOK0NUwEeOXn9fE7v0z7Q" name="Customizable Wizard"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_i2nUoNXBEeOXn9fE7v0z7Q" name="Project creation di name"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_3J3LYNXBEeOXn9fE7v0z7Q" name="Diagram Name "/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_ruugoNXIEeOXn9fE7v0z7Q" name="Model Name"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_3HeqINXfEeOXn9fE7v0z7Q" name="help"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_mgTSE9RWEeOj2b7ZAwHgmA" name="UseCases">
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_mgTSFNRWEeOj2b7ZAwHgmA" name="useCasesAbstraction" client="_mgTSE9RWEeOj2b7ZAwHgmA" supplier="_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <packagedElement xmi:type="uml:Component" xmi:id="_mgTSFdRWEeOj2b7ZAwHgmA" name="Papyrus Wizard" useCase="_NKToQNRYEeOj2b7ZAwHgmA _fsVfYNRgEeOYNryRxL8wIQ _GrEbANW4EeOXn9fE7v0z7Q">
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_NKToQNRYEeOj2b7ZAwHgmA" name="Create new Profiled UML Project/Model" subject="_mgTSFdRWEeOj2b7ZAwHgmA">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_YMLA8NRdEeOYNryRxL8wIQ">
+ <body>A user create a new UML Project or Model with a profiled applied </body>
+ </ownedComment>
+ </ownedUseCase>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_fsVfYNRgEeOYNryRxL8wIQ" name="Create a new Generic Model" subject="_mgTSFdRWEeOj2b7ZAwHgmA">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_qg_70NRgEeOYNryRxL8wIQ">
+ <body>A user should be able to create an Ecore Model</body>
+ </ownedComment>
+ </ownedUseCase>
+ <ownedUseCase xmi:type="uml:UseCase" xmi:id="_GrEbANW4EeOXn9fE7v0z7Q" name="Create a new UML Project/Model" subject="_mgTSFdRWEeOj2b7ZAwHgmA">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_-JMEENW4EeOXn9fE7v0z7Q" annotatedElement="_GrEbANW4EeOXn9fE7v0z7Q">
+ <body>A user should be able to create a standard UML Project/Model</body>
+ </ownedComment>
+ </ownedUseCase>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Actor" xmi:id="_ycV0ANRbEeOYNryRxL8wIQ" name="Papyrus User"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_jRchsNRcEeOYNryRxL8wIQ" name="A_actor1_create new profiled uml project/model" memberEnd="_jRchsdRcEeOYNryRxL8wIQ _jRchtNRcEeOYNryRxL8wIQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_jRchsdRcEeOYNryRxL8wIQ" name="actor1" type="_ycV0ANRbEeOYNryRxL8wIQ" association="_jRchsNRcEeOYNryRxL8wIQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jRchstRcEeOYNryRxL8wIQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jRchs9RcEeOYNryRxL8wIQ" value="1"/>
+ </ownedEnd>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_jRchtNRcEeOYNryRxL8wIQ" name="create new profiled uml project/model" type="_NKToQNRYEeOj2b7ZAwHgmA" association="_jRchsNRcEeOYNryRxL8wIQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jRchtdRcEeOYNryRxL8wIQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jRchttRcEeOYNryRxL8wIQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_jI9XQNRgEeOYNryRxL8wIQ" name="A_papyrus user_create a new model" memberEnd="_jI9XQdRgEeOYNryRxL8wIQ _jI9XRNRgEeOYNryRxL8wIQ">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_jI9XQdRgEeOYNryRxL8wIQ" name="papyrus user" type="_ycV0ANRbEeOYNryRxL8wIQ" association="_jI9XQNRgEeOYNryRxL8wIQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jI9XQtRgEeOYNryRxL8wIQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jI9XQ9RgEeOYNryRxL8wIQ" value="1"/>
+ </ownedEnd>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_jI9XRNRgEeOYNryRxL8wIQ" name="create a new model" type="_fsVfYNRgEeOYNryRxL8wIQ" association="_jI9XQNRgEeOYNryRxL8wIQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jI9XRdRgEeOYNryRxL8wIQ" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jI9XRtRgEeOYNryRxL8wIQ" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_LHT80NW4EeOXn9fE7v0z7Q" name="A_papyrus user_create a bew uml project/model" memberEnd="_LHT80dW4EeOXn9fE7v0z7Q _LHT81NW4EeOXn9fE7v0z7Q">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_LHT80dW4EeOXn9fE7v0z7Q" name="papyrus user" type="_ycV0ANRbEeOYNryRxL8wIQ" association="_LHT80NW4EeOXn9fE7v0z7Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_LHT80tW4EeOXn9fE7v0z7Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_LHT809W4EeOXn9fE7v0z7Q" value="1"/>
+ </ownedEnd>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_LHT81NW4EeOXn9fE7v0z7Q" name="create a bew uml project/model" type="_GrEbANW4EeOXn9fE7v0z7Q" association="_LHT80NW4EeOXn9fE7v0z7Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_LHT81dW4EeOXn9fE7v0z7Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_LHT81tW4EeOXn9fE7v0z7Q" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:UseCase" xmi:id="_SQDhINW4EeOXn9fE7v0z7Q" name="Creation of UML Model/Project Test"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_omILQNW4EeOXn9fE7v0z7Q" name="A_creation of uml model/project test_create a new uml project/model" memberEnd="_omILQdW4EeOXn9fE7v0z7Q _omILRNW4EeOXn9fE7v0z7Q">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_omILQdW4EeOXn9fE7v0z7Q" name="creation of uml model/project test" type="_SQDhINW4EeOXn9fE7v0z7Q" association="_omILQNW4EeOXn9fE7v0z7Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_omILQtW4EeOXn9fE7v0z7Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_omILQ9W4EeOXn9fE7v0z7Q" value="1"/>
+ </ownedEnd>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_omILRNW4EeOXn9fE7v0z7Q" name="create a new uml project/model" type="_GrEbANW4EeOXn9fE7v0z7Q" association="_omILQNW4EeOXn9fE7v0z7Q">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_omILRdW4EeOXn9fE7v0z7Q" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_omILRtW4EeOXn9fE7v0z7Q" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_mgTSFtRWEeOj2b7ZAwHgmA" name="Design">
+ <packagedElement xmi:type="uml:Abstraction" xmi:id="_mgTSF9RWEeOj2b7ZAwHgmA" name="DesignAbstraction" client="_mgTSFtRWEeOj2b7ZAwHgmA" supplier="_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <packagedElement xmi:type="uml:Component" xmi:id="_pv1n0NRkEeOYNryRxL8wIQ" name="org.eclipse.papyrus.diagram">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_qx_BUNRkEeOYNryRxL8wIQ" name="Port0" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Component" xmi:id="_p7NRoNUlEeOXn9fE7v0z7Q" name="org.eclipse.papyrus.infra.core">
+ <ownedAttribute xmi:type="uml:Port" xmi:id="_yQgIoNUlEeOXn9fE7v0z7Q" name="org.eclipse.papyrus.uml.diagram.synchronizeview" aggregation="composite"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_KWUSENUmEeOXn9fE7v0z7Q" name="Dependency1" client="_qx_BUNRkEeOYNryRxL8wIQ" supplier="_yQgIoNUlEeOXn9fE7v0z7Q"/>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_AACQgN_3EeOXk88MU6upww" name="Creation of a new Papyrus Model" node="_DbviYN_3EeOXk88MU6upww _RHSsYN_3EeOXk88MU6upww _fxeB0N_3EeOXk88MU6upww _i-Fu0N_3EeOXk88MU6upww _lwAc0N_3EeOXk88MU6upww _OAKG4N_4EeOXk88MU6upww _QbjyUN_4EeOXk88MU6upww _YFXcUN_4EeOXk88MU6upww _cf34wN_4EeOXk88MU6upww _7sklUN_4EeOXk88MU6upww __s5nMN_4EeOXk88MU6upww _CSja0N_5EeOXk88MU6upww _oAeYsN_5EeOXk88MU6upww _DmYkwN_6EeOXk88MU6upww _GQqZsN_6EeOXk88MU6upww _ITDIMN_6EeOXk88MU6upww _r9AqQN_6EeOXk88MU6upww" group="_YCQBcN_5EeOXk88MU6upww">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_MnfjcN_7EeOXk88MU6upww" name="Constraint">
+ <specification xmi:type="uml:LiteralString" xmi:id="_MnsXwN_7EeOXk88MU6upww" name="constraintSpec"/>
+ </ownedRule>
+ <ownedBehavior xmi:type="uml:Activity" xmi:id="_bg2PQN_5EeOXk88MU6upww" name="Activity1"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_p3Ow4N_3EeOXk88MU6upww" name="ControlFlow" target="_RHSsYN_3EeOXk88MU6upww" source="_DbviYN_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_vvT-kN_3EeOXk88MU6upww" name="ControlFlow1" target="_fxeB0N_3EeOXk88MU6upww" source="_RHSsYN_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_xTMMIN_3EeOXk88MU6upww" name="[CDO]" target="_i-Fu0N_3EeOXk88MU6upww" source="_fxeB0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_x_9ykN_3EeOXk88MU6upww" name="[Local File System]" target="_lwAc0N_3EeOXk88MU6upww" source="_fxeB0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_03-sEN_4EeOXk88MU6upww" name="ControlFlow4" target="_OAKG4N_4EeOXk88MU6upww" source="_QbjyUN_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_1xTrUN_5EeOXk88MU6upww" name="ControlFlow5" target="_7sklUN_4EeOXk88MU6upww" source="_i-Fu0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_3bulwN_5EeOXk88MU6upww" name="ControlFlow6" target="_7sklUN_4EeOXk88MU6upww" source="_lwAc0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_5TexkN_5EeOXk88MU6upww" name="ControlFlow7" target="_7sklUN_4EeOXk88MU6upww" source="_lwAc0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_7F2HEN_5EeOXk88MU6upww" name="ControlFlow8" target="_QbjyUN_4EeOXk88MU6upww" source="_7sklUN_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_8gVvIN_5EeOXk88MU6upww" name="ControlFlow9" target="_7sklUN_4EeOXk88MU6upww" source="_lwAc0N_3EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_J_0zEN_6EeOXk88MU6upww" name="ControlFlow10" target="_oAeYsN_5EeOXk88MU6upww" source="_OAKG4N_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_LilmUN_6EeOXk88MU6upww" name="ControlFlow11" target="_ITDIMN_6EeOXk88MU6upww" source="_oAeYsN_5EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_Mh35EN_6EeOXk88MU6upww" name="ControlFlow12" target="_YFXcUN_4EeOXk88MU6upww" source="_oAeYsN_5EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_Nn00gN_6EeOXk88MU6upww" name="ControlFlow13" target="_GQqZsN_6EeOXk88MU6upww" source="_oAeYsN_5EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_SbVm0N_6EeOXk88MU6upww" name="ControlFlow14" target="_GQqZsN_6EeOXk88MU6upww" source="_YFXcUN_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_VTxMgN_6EeOXk88MU6upww" name="ControlFlow15" target="_cf34wN_4EeOXk88MU6upww" source="_GQqZsN_6EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_XVBSkN_6EeOXk88MU6upww" name="ControlFlow16" target="_ITDIMN_6EeOXk88MU6upww" source="_cf34wN_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_ZLbakN_6EeOXk88MU6upww" name="ControlFlow17" target="_ITDIMN_6EeOXk88MU6upww" source="_YFXcUN_4EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_bKOpkN_6EeOXk88MU6upww" name="ControlFlow18" target="_DmYkwN_6EeOXk88MU6upww" source="_ITDIMN_6EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_cSX9YN_6EeOXk88MU6upww" name="ControlFlow19" target="__s5nMN_4EeOXk88MU6upww" source="_DmYkwN_6EeOXk88MU6upww"/>
+ <edge xmi:type="uml:ControlFlow" xmi:id="_yxnKkN_6EeOXk88MU6upww" name="ControlFlow20" target="_lwAc0N_3EeOXk88MU6upww" source="_r9AqQN_6EeOXk88MU6upww"/>
+ <group xmi:type="uml:StructuredActivityNode" xmi:id="_YCQBcN_5EeOXk88MU6upww" name="StructuredActivityNode"/>
+ <node xmi:type="uml:InitialNode" xmi:id="_DbviYN_3EeOXk88MU6upww" name="New Papyrus model from nothing" outgoing="_p3Ow4N_3EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_RHSsYN_3EeOXk88MU6upww" name="Selection of model Storage" incoming="_p3Ow4N_3EeOXk88MU6upww" outgoing="_vvT-kN_3EeOXk88MU6upww"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_fxeB0N_3EeOXk88MU6upww" name="" incoming="_vvT-kN_3EeOXk88MU6upww" outgoing="_xTMMIN_3EeOXk88MU6upww _x_9ykN_3EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_i-Fu0N_3EeOXk88MU6upww" name="create a model with CDO Storage" incoming="_xTMMIN_3EeOXk88MU6upww" outgoing="_1xTrUN_5EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_lwAc0N_3EeOXk88MU6upww" name="Create a model in the Local File System" incoming="_x_9ykN_3EeOXk88MU6upww _yxnKkN_6EeOXk88MU6upww" outgoing="_3bulwN_5EeOXk88MU6upww _5TexkN_5EeOXk88MU6upww _8gVvIN_5EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_OAKG4N_4EeOXk88MU6upww" name="Select Diagram Kind" incoming="_03-sEN_4EeOXk88MU6upww" outgoing="_J_0zEN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_QbjyUN_4EeOXk88MU6upww" name="Select Diagram Category" incoming="_7F2HEN_5EeOXk88MU6upww" outgoing="_03-sEN_4EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_YFXcUN_4EeOXk88MU6upww" name="Apply Template" incoming="_Mh35EN_6EeOXk88MU6upww" outgoing="_SbVm0N_6EeOXk88MU6upww _ZLbakN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_cf34wN_4EeOXk88MU6upww" name="Select Root Element" incoming="_VTxMgN_6EeOXk88MU6upww" outgoing="_XVBSkN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:MergeNode" xmi:id="_7sklUN_4EeOXk88MU6upww" name="MergeNode" incoming="_1xTrUN_5EeOXk88MU6upww _3bulwN_5EeOXk88MU6upww _5TexkN_5EeOXk88MU6upww _8gVvIN_5EeOXk88MU6upww" outgoing="_7F2HEN_5EeOXk88MU6upww"/>
+ <node xmi:type="uml:ActivityFinalNode" xmi:id="__s5nMN_4EeOXk88MU6upww" name="ActivityFinalNode" incoming="_cSX9YN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:ForkNode" xmi:id="_CSja0N_5EeOXk88MU6upww" name="ForkNode"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_oAeYsN_5EeOXk88MU6upww" name="DecisionNode1" incoming="_J_0zEN_6EeOXk88MU6upww" outgoing="_LilmUN_6EeOXk88MU6upww _Mh35EN_6EeOXk88MU6upww _Nn00gN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:OpaqueAction" xmi:id="_DmYkwN_6EeOXk88MU6upww" name="Model Creation" incoming="_bKOpkN_6EeOXk88MU6upww" outgoing="_cSX9YN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_GQqZsN_6EeOXk88MU6upww" name="DecisionNode2" incoming="_Nn00gN_6EeOXk88MU6upww _SbVm0N_6EeOXk88MU6upww" outgoing="_VTxMgN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:DecisionNode" xmi:id="_ITDIMN_6EeOXk88MU6upww" name="DecisionNode3" incoming="_LilmUN_6EeOXk88MU6upww _XVBSkN_6EeOXk88MU6upww _ZLbakN_6EeOXk88MU6upww" outgoing="_bKOpkN_6EeOXk88MU6upww"/>
+ <node xmi:type="uml:InitialNode" xmi:id="_r9AqQN_6EeOXk88MU6upww" name="Create Papyrus Model from existing ressource" outgoing="_yxnKkN_6EeOXk88MU6upww"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_mgTSGNRWEeOj2b7ZAwHgmA" name="Test">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_mgTSGdRWEeOj2b7ZAwHgmA" name="Dependency1" client="_mgTSGNRWEeOj2b7ZAwHgmA" supplier="_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_mgTSGtRWEeOj2b7ZAwHgmA" name="Dependency2" client="_mgTSGNRWEeOj2b7ZAwHgmA" supplier="_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Model" xmi:id="_OT7W4NXFEeOXn9fE7v0z7Q" name="Creation of a new Papyrus Wizard Framework">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OT_BQNXFEeOXn9fE7v0z7Q">
+ <body>The aim of this plugin is to improve the creation wizard of a new UML project or model.&#xD;
+For example a generic UML Diagram should not be stuck with a specified category &#xD;
+&#xD;
+</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OUCEkNXFEeOXn9fE7v0z7Q" name="Requirements">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUFu8NXFEeOXn9fE7v0z7Q">
+ <body>- Root Element Choice (id=Req001):
+ The wizard shall allow the user to specify the root element e.g. Package or Model</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUJZUNXFEeOXn9fE7v0z7Q">
+ <body>- Root Model Element Name (id=Req002):
+ Papyrus wizard shall enable to specify the name of the root element of the created model.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUNqwNXFEeOXn9fE7v0z7Q">
+ <body>- Sash Editor Mode (id=req003):
+ Should be able to chose between legacy or &quot;1.0&quot; mode to serialize the sash model.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUQHANXFEeOXn9fE7v0z7Q">
+ <body>- Template Models (id=Req004):
+ Papyrus model creation wizard shall enable to load multiple template models. Currently, Papyrus model creation wizzard enable to load only template model even if checkboxes allow you to pick several.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUR8MNXFEeOXn9fE7v0z7Q">
+ <body>- Profiled Model (id=Req005):
+ Papyrus model creation wizard shall select profiles to apply to the created model.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUTxYNXFEeOXn9fE7v0z7Q">
+ <body>- Layout Requirement (id=req006):
+ The layout of wizard page when selecting the the diagram should be similar to the layout used in oep.infra.natable.comon.wizards.CreateNattableFromCatalogWizard.java</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUWNoNXFEeOXn9fE7v0z7Q">
+ <body>- Generic Model (id=req007):
+ Papyrus model creation wizard should to create a generic Ecore model.</body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUYC0NXFEeOXn9fE7v0z7Q">
+ <body>- Customizable Wizard (id=req008):
+ The wizard should be easily customizable </body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUafENXFEeOXn9fE7v0z7Q">
+ <body>- Project creation di name (id=req009):
+ the wizard shall allow to choose the name of the di/uml/notation files when we create a new project </body>
+ </ownedComment>
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OUcUQNXFEeOXn9fE7v0z7Q">
+ <body>- Diagram Name (id=req010):
+ Diagram name should be grayed out if any diagram are not selected</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OUdiYNXFEeOXn9fE7v0z7Q" name="Use Cases">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OWlCQNXFEeOXn9fE7v0z7Q">
+ <body>UseCaseDiagram</body>
+ </ownedComment>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OWm3cNXFEeOXn9fE7v0z7Q" name="Create new Profiled UML Project/Model">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OWoFkdXFEeOXn9fE7v0z7Q">
+ <body>A user create a new UML Project or Model with a profiled applied </body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OWpTsdXFEeOXn9fE7v0z7Q" name="Create a new Generic Model">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OWrI4NXFEeOXn9fE7v0z7Q">
+ <body>A user should be able to create an Ecore Model</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OWsXANXFEeOXn9fE7v0z7Q" name="Create a new UML Project/Model">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OWtlINXFEeOXn9fE7v0z7Q">
+ <body>A user should be able to create a standard UML Project/Model</body>
+ </ownedComment>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OWvaUNXFEeOXn9fE7v0z7Q" name="Creation of UML Model/Project Test"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_OWwocNXFEeOXn9fE7v0z7Q" name="Design">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_OXPwoNXFEeOXn9fE7v0z7Q">
+ <body>Component Diagram</body>
+ </ownedComment>
+ </packagedElement>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_mgTSG9RWEeOj2b7ZAwHgmA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mgTSHNRWEeOj2b7ZAwHgmA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_VA6mkMcPEeO9CYUoXDRplw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_kWqjAMbXEeO09JBvNFZRNw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_mgTSHdRWEeOj2b7ZAwHgmA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mgTSHtRWEeOj2b7ZAwHgmA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_VA-4AMcPEeO9CYUoXDRplw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_qCT3MMbXEeO09JBvNFZRNw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_mgTSH9RWEeOj2b7ZAwHgmA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mgTSINRWEeOj2b7ZAwHgmA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_VBAtMccPEeO9CYUoXDRplw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://DEVELOPER_PROFILES/developerprocess.profile.uml#_2LNtQMbYEeO09JBvNFZRNw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_mgTSIdRWEeOj2b7ZAwHgmA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mgTSItRWEeOj2b7ZAwHgmA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_mgTSI9RWEeOj2b7ZAwHgmA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_mgTSJNRWEeOj2b7ZAwHgmA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://DEVELOPER_PROFILES/Document.profile.uml#_qR44IMn0EeO9CYUoXDRplw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://DEVELOPER_PROFILES/Document.profile.uml#_D0JcUMnzEeO9CYUoXDRplw"/>
+ </profileApplication>
+ </uml:Model>
+ <structure:Project xmi:id="_mgTSJdRWEeOj2b7ZAwHgmA" author="Thibault Le Ouay" version="0.1" base_Model="_mgTSENRWEeOj2b7ZAwHgmA" title="Creation of a new Papyrus Wizard Framework"/>
+ <structure:Requirements xmi:id="_mgTSJtRWEeOj2b7ZAwHgmA" base_Model="_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <structure:UseCases xmi:id="_mgTSJ9RWEeOj2b7ZAwHgmA" base_Model="_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <structure:Design xmi:id="_mgTSKNRWEeOj2b7ZAwHgmA" base_Model="_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ <structure:Tests xmi:id="_mgTSKdRWEeOj2b7ZAwHgmA" base_Model="_mgTSGNRWEeOj2b7ZAwHgmA"/>
+ <structure:Requirements xmi:id="_0E6toNRWEeOj2b7ZAwHgmA" base_Model="_mgTSEtRWEeOj2b7ZAwHgmA"/>
+ <structure:Project xmi:id="_14_TUNRWEeOj2b7ZAwHgmA" author="Thibault Le Ouay&#xD;&#xA;" version="0.1&#xD;&#xA;" base_Model="_mgTSENRWEeOj2b7ZAwHgmA" title="Creation of a new Papyrus Model/Project creation Wizard"/>
+ <structure:UseCases xmi:id="_29k80NRWEeOj2b7ZAwHgmA" base_Model="_mgTSE9RWEeOj2b7ZAwHgmA"/>
+ <structure:Design xmi:id="_4R3PMNRWEeOj2b7ZAwHgmA" base_Model="_mgTSFtRWEeOj2b7ZAwHgmA"/>
+ <structure:Tests xmi:id="_5gDgoNRWEeOj2b7ZAwHgmA" base_Model="_mgTSGNRWEeOj2b7ZAwHgmA"/>
+ <Requirements:Requirement xmi:id="_oSPUUNRXEeOj2b7ZAwHgmA" text="The wizard shall allow the user to specify the root element e.g. Package or Model" id="Req001" base_Class="_oRxaQNRXEeOj2b7ZAwHgmA"/>
+ <Requirements:Requirement xmi:id="_FkB98NRZEeOj2b7ZAwHgmA" text=" Papyrus wizard shall enable to specify the name of the root element of the created model." id="Req002" base_Class="_FkAv0NRZEeOj2b7ZAwHgmA"/>
+ <Requirements:Requirement xmi:id="_DcDWENRfEeOYNryRxL8wIQ" text="Should be able to chose between legacy or &quot;1.0&quot; mode to serialize the sash model." id="req003" base_Class="_Dbc5INRfEeOYNryRxL8wIQ"/>
+ <Requirements:Requirement xmi:id="_cx2gsNRfEeOYNryRxL8wIQ" text="Papyrus model creation wizard shall enable to load multiple template models. Currently, Papyrus model creation wizzard enable to load only template model even if checkboxes allow you to pick several." id="Req004" base_Class="_cx1SkNRfEeOYNryRxL8wIQ"/>
+ <Requirements:Requirement xmi:id="_-fp4ENRfEeOYNryRxL8wIQ" text="Papyrus model creation wizard shall select profiles to apply to the created model." id="Req005" base_Class="_-fop8NRfEeOYNryRxL8wIQ"/>
+ <Requirements:Requirement xmi:id="_ZzfIgNUXEeOXn9fE7v0z7Q" text="The layout of wizard page when selecting the the diagram should be similar to the layout used in oep.infra.natable.comon.wizards.CreateNattableFromCatalogWizard.java" id="req006" base_Class="_ZzGuANUXEeOXn9fE7v0z7Q"/>
+ <Requirements:Requirement xmi:id="_pfZbMNUsEeOXn9fE7v0z7Q" text="Papyrus model creation wizard should to create a generic Ecore model." id="req007" base_Class="_pfTUkNUsEeOXn9fE7v0z7Q"/>
+ <Requirements:Requirement xmi:id="_2fR1MNUwEeOXn9fE7v0z7Q" text="The wizard should be easily customizable " id="req008" base_Class="_2fOK0NUwEeOXn9fE7v0z7Q"/>
+ <trace:UseCaseTest xmi:id="_YwAAENW4EeOXn9fE7v0z7Q" base_UseCase="_SQDhINW4EeOXn9fE7v0z7Q"/>
+ <Requirements:Requirement xmi:id="_i2pJ0NXBEeOXn9fE7v0z7Q" text="the wizard shall allow to choose the name of the di/uml/notation files when we create a new project " id="req009" base_Class="_i2nUoNXBEeOXn9fE7v0z7Q"/>
+ <Requirements:Requirement xmi:id="_3J4ZgNXBEeOXn9fE7v0z7Q" text="Diagram name should be grayed out if any diagram are not selected" id="req010" base_Class="_3J3LYNXBEeOXn9fE7v0z7Q"/>
+ <Document:Document xmi:id="_OT9MENXFEeOXn9fE7v0z7Q" base_Model="_OT7W4NXFEeOXn9fE7v0z7Q" author="Thibault Le Ouay" version="0.1"/>
+ <Document:Content xmi:id="_OUAPYNXFEeOXn9fE7v0z7Q" base_Comment="_OT_BQNXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OUDSsNXFEeOXn9fE7v0z7Q" base_Package="_OUCEkNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUG9ENXFEeOXn9fE7v0z7Q" base_Comment="_OUFu8NXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OULOgNXFEeOXn9fE7v0z7Q" base_Comment="_OUJZUNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUOR0NXFEeOXn9fE7v0z7Q" base_Comment="_OUNqwNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUQuENXFEeOXn9fE7v0z7Q" base_Comment="_OUQHANXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUSjQNXFEeOXn9fE7v0z7Q" base_Comment="_OUR8MNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUU_gNXFEeOXn9fE7v0z7Q" base_Comment="_OUTxYNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUW0sNXFEeOXn9fE7v0z7Q" base_Comment="_OUWNoNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUZQ8NXFEeOXn9fE7v0z7Q" base_Comment="_OUYC0NXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUbGINXFEeOXn9fE7v0z7Q" base_Comment="_OUafENXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OUc7UNXFEeOXn9fE7v0z7Q" base_Comment="_OUcUQNXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OUewgNXFEeOXn9fE7v0z7Q" base_Package="_OUdiYNXFEeOXn9fE7v0z7Q"/>
+ <Document:ImageRef xmi:id="_OWmQYNXFEeOXn9fE7v0z7Q" base_Comment="_OWlCQNXFEeOXn9fE7v0z7Q" ref="C:/runtime-New_configuration/org.eclipse.papyrus.diagram/imgDOC/UseCaseDiagram.png"/>
+ <Document:Section xmi:id="_OWoFkNXFEeOXn9fE7v0z7Q" base_Package="_OWm3cNXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OWpTsNXFEeOXn9fE7v0z7Q" base_Comment="_OWoFkdXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OWqh0NXFEeOXn9fE7v0z7Q" base_Package="_OWpTsdXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OWrv8NXFEeOXn9fE7v0z7Q" base_Comment="_OWrI4NXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OWs-ENXFEeOXn9fE7v0z7Q" base_Package="_OWsXANXFEeOXn9fE7v0z7Q"/>
+ <Document:Content xmi:id="_OWuzQNXFEeOXn9fE7v0z7Q" base_Comment="_OWtlINXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OWwBYNXFEeOXn9fE7v0z7Q" base_Package="_OWvaUNXFEeOXn9fE7v0z7Q"/>
+ <Document:Section xmi:id="_OWxPgNXFEeOXn9fE7v0z7Q" base_Package="_OWwocNXFEeOXn9fE7v0z7Q"/>
+ <Document:ImageRef xmi:id="_OXRl0NXFEeOXn9fE7v0z7Q" base_Comment="_OXPwoNXFEeOXn9fE7v0z7Q" ref="C:/runtime-New_configuration/org.eclipse.papyrus.diagram/imgDOC/Component_Diagram.png"/>
+ <Requirements:Requirement xmi:id="_ruvHsNXIEeOXn9fE7v0z7Q" text="To hide as much as possible the 3 files (di/uml/notation) Papyrus wizard shall ask only for the filename without any extension " id="req011" base_Class="_ruugoNXIEeOXn9fE7v0z7Q"/>
+ <Requirements:Requirement xmi:id="_3HgfUNXfEeOXn9fE7v0z7Q" text="Papyrus wizard shall provide help to guide the user through the model/project Creation" id="req012" base_Class="_3HeqINXfEeOXn9fE7v0z7Q"/>
+</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/plugin.xml
index 1bb7319d284..b928c2269ef 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/plugin.xml
@@ -16,10 +16,10 @@
</category>
<wizard
category="org.eclipse.papyrus.wizards.category"
- class="org.eclipse.papyrus.uml.diagram.wizards.NewPapyrusProjectWizard"
+ class="org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard"
finalPerspective="org.eclipse.papyrus.infra.core.perspective"
icon="icons/papyrus/new_papyrus_project.gif"
- id="org.eclipse.papyrus.uml.diagram.wizards.1createproject"
+ id="org.eclipse.papyrus.uml.diagram.wizards.createproject"
name="Papyrus Project"
project="true">
<description>
@@ -28,7 +28,7 @@
</wizard>
<wizard
category="org.eclipse.papyrus.wizards.category"
- class="org.eclipse.papyrus.uml.diagram.wizards.InitModelWizard"
+ class="org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard"
finalPerspective="org.eclipse.papyrus.infra.core.perspective"
icon="icons/papyrus/new_papyrus_model.gif"
id="org.eclipse.papyrus.uml.diagram.wizards.createmodel"
@@ -39,7 +39,7 @@
<extension
point="org.eclipse.papyrus.uml.diagram.wizards.newModelStorageProviders">
<provider
- class="org.eclipse.papyrus.uml.diagram.wizards.WorkspaceNewModelStorageProvider"
+ class="org.eclipse.papyrus.uml.diagram.wizards.providers.WorkspaceNewModelStorageProvider"
name="In the workspace">
<enablement>
<iterate>
@@ -50,5 +50,12 @@
</enablement>
</provider>
</extension>
+<extension
+ point="org.eclipse.help.contexts">
+ <contexts
+ file="help/helpContext.xml"
+ plugin="org.eclipse.papyrus.uml.diagram.wizards">
+ </contexts>
+</extension>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/schema/templates.exsd b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/schema/templates.exsd
index e430388fdde..bcec7aa6d00 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/schema/templates.exsd
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/schema/templates.exsd
@@ -1,12 +1,12 @@
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.papyrus.uml.diagram.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<schema targetNamespace="org.eclipse.papyrus.uml.diagram.wizards" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
- <meta.schema plugin="org.eclipse.papyrus.uml.diagram.common" id="templates" name="UML2 Model Templates"/>
+ <meta.schema plugin="org.eclipse.papyrus.uml.diagram.wizards" id="templates" name="UML2 Model Templates"/>
</appinfo>
<documentation>
- This extension point registers UML2 model templates that can be selected when creating new diagrams using the MOSKitt-UML2 editor to initialize new files.
+ This extension point registers UML2 model templates that can be selected when creating new diagrams.
</documentation>
</annotation>
@@ -18,7 +18,10 @@
</annotation>
<complexType>
<sequence>
- <element ref="template" minOccurs="1" maxOccurs="unbounded"/>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="template"/>
+ <element ref="transformation"/>
+ </choice>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -81,7 +84,7 @@
</appinfo>
</annotation>
</attribute>
- <attribute name="notation_file" type="string">
+ <attribute name="notation_file" type="string" use="required">
<annotation>
<documentation>
@@ -91,7 +94,7 @@
</appinfo>
</annotation>
</attribute>
- <attribute name="di_file" type="string">
+ <attribute name="di_file" type="string" use="required">
<annotation>
<documentation>
@@ -114,6 +117,48 @@
</complexType>
</element>
+ <element name="transformation">
+ <complexType>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ A unique identifier for a template.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ A human readable description of the model template.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="language" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.papyrus.infra.core.papyrusDiagram/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="Transformation" type="string" use="required">
+ <annotation>
+ <documentation>
+ set the generator for the template
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appinfo>
<meta.section type="since"/>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractNewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractNewModelStorageProvider.java
index ec55c460880..9b4b9e445cc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractNewModelStorageProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractNewModelStorageProvider.java
@@ -1,54 +1,30 @@
-/*****************************************************************************
- * 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.diagram.wizards;
-
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * Partial implementation of the {@link INewModelStorageProvider} protocol.
- */
-public abstract class AbstractNewModelStorageProvider
- implements INewModelStorageProvider {
-
- public void init(CreateModelWizard wizard, IStructuredSelection selection) {
- // pass
- }
-
- public IStatus validateDiagramCategories(String... newCategories) {
- return Status.OK_STATUS;
- }
-
- /**
- * Creates an {@link IFileEditorInput} for workspace resource URIs, or an {@link URIEditorInput} otherwise.
- */
- public IEditorInput createEditorInput(URI uri) {
- if (uri.isPlatformResource()) {
- return new FileEditorInput(ResourcesPlugin.getWorkspace().getRoot()
- .getFile(new Path(uri.toPlatformString(true))));
- } else {
- return new URIEditorInput(uri);
- }
- }
-
- public ISelectProviderPart createSelectProviderPart() {
- return null;
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.providers.AbstractNewModelStorageProvider}
+ *
+ */
+@Deprecated
+public abstract class AbstractNewModelStorageProvider extends org.eclipse.papyrus.uml.diagram.wizards.providers.AbstractNewModelStorageProvider {
+
+ @Deprecated
+ public void init(org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard wizard, IStructuredSelection selection) {
+ super.init(wizard, selection);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractSelectStorageProviderPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractSelectStorageProviderPart.java
index 86f24f37a96..5153e8daf60 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractSelectStorageProviderPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/AbstractSelectStorageProviderPart.java
@@ -1,62 +1,23 @@
-/*****************************************************************************
- * 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.diagram.wizards;
-
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.eclipse.papyrus.uml.diagram.wizards.INewModelStorageProvider.ISelectProviderPart;
-
-/**
- * This is the AbstractSelectStorageProviderPart type. Enjoy.
- */
-public abstract class AbstractSelectStorageProviderPart
- implements ISelectProviderPart {
-
- private final CopyOnWriteArrayList<IPartCompleteListener> listeners = new CopyOnWriteArrayList<IPartCompleteListener>();
-
- private boolean enabled;
-
- public AbstractSelectStorageProviderPart() {
- super();
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
-
- enableControls(enabled);
- }
-
- protected abstract void enableControls(boolean enabled);
-
- public void addPartCompleteListener(IPartCompleteListener listener) {
- listeners.addIfAbsent(listener);
- }
-
- public void removePartCompleteListener(IPartCompleteListener listener) {
- listeners.remove(listener);
- }
-
- protected void firePartCompleteChanged() {
- for (IPartCompleteListener next : listeners) {
- try {
- next.partCompletenessChanged(this);
- } catch (Exception e) {
- Activator.log.error(
- "Uncaught exception in part-complete listener.", e);
- }
- }
- }
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.providers.AbstractSelectStorageProviderPart}
+ *
+ */
+@Deprecated
+public abstract class AbstractSelectStorageProviderPart extends org.eclipse.papyrus.uml.diagram.wizards.providers.AbstractSelectStorageProviderPart {
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java
index ef0ef1d1084..f13e5af10f7 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateModelWizard.java
@@ -1,856 +1,27 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2013 Obeo, CEA LIST.
+/*****************************************************************************
+ * Copyright (c) 2014 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:
- * Obeo - initial API and implementation
- * Tatiana Fesenko(CEA) - [313179] Refactor CreateModelWizard
- * Saadia Dhouib (CEA LIST) - Implementation of loading diagrams from template files (.uml, .di , .notation)
- * Christian W. Damus (CEA) - create models by URI, not IFile (CDO)
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
- *******************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import static org.eclipse.papyrus.uml.diagram.wizards.Activator.log;
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.common.command.CommandStack;
-import org.eclipse.emf.common.ui.URIEditorInput;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.papyrus.infra.core.editor.BackboneException;
-import org.eclipse.papyrus.infra.core.extension.commands.IModelCreationCommand;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModelUtils;
-import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
-import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
-import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryDescriptor;
-import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryRegistry;
-import org.eclipse.papyrus.uml.diagram.wizards.category.NewPapyrusModelCommand;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage.CategoryProvider;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
-import org.eclipse.papyrus.uml.diagram.wizards.template.InitFromTemplateCommand;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IURIEditorInput;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.services.IEvaluationService;
+package org.eclipse.papyrus.uml.diagram.wizards;
/**
- * Create new model file and initialize a selected diagram. This wizard create
- * several files : <li>*.di : the DI file to store Di diagrams and references all external diagrams like GMF diagrams.</li> <li>*.notation : the file to store pure GMF diagrams</li> <li>*.uml : the standard UML file to store UML semantics elements. (Model,
- * Package, Class,...)</li>
- *
- * Those files can be used with the PapyrusEditor (see plugin.xml).
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard}
*/
-public class CreateModelWizard extends Wizard implements INewWizard {
-
- /** The Constant WIZARD_ID. */
- public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.createmodel"; //$NON-NLS-1$
-
- /** The Constant NEW_MODEL_SETTINGS. */
- public static final String NEW_MODEL_SETTINGS = "NewModelWizard"; //$NON-NLS-1$
-
- private SelectStorageProviderPage selectStorageProviderPage;
-
- /** Select kind of new diagram the wizard must create. */
- private SelectDiagramKindPage selectDiagramKindPage;
-
- /** The select diagram category page. */
- private SelectDiagramCategoryPage selectDiagramCategoryPage;
-
- /** Current workbench. */
- private IWorkbench workbench;
-
- private NewModelStorageProviderRegistry storageProviderRegistry;
-
- private INewModelStorageProvider selectedStorageProvider;
-
- private Map<INewModelStorageProvider, List<IWizardPage>> providerPages = new java.util.HashMap<INewModelStorageProvider, List<IWizardPage>>();
-
- private Map<IWizardPage, INewModelStorageProvider> providersByPage = new java.util.HashMap<IWizardPage, INewModelStorageProvider>();
-
- private int startProviderPageIndex; // index of last page before provider pages
-
- private int endProviderPageIndex; // index of first page after provider pages
-
- /**
- * Instantiates a new creates the model wizard.
- */
- public CreateModelWizard() {
- super();
- setWindowTitle(Messages.CreateModelWizard_new_papyrus_model_title);
- }
-
- /**
- * Adds the pages.
- *
- * {@inheritDoc}
- */
- @Override
- public void addPages() {
- addPageIfNotNull(selectStorageProviderPage);
-
- startProviderPageIndex = getPageCount() - 1;
- for (INewModelStorageProvider next : getStorageProviders()) {
- List<IWizardPage> pageList = new java.util.ArrayList<IWizardPage>(3);
- for (IWizardPage page : next.createPages()) {
- if (page != null) {
- pageList.add(page);
- providersByPage.put(page, next);
- addPage(page);
- }
- }
- providerPages.put(next, pageList);
- }
- endProviderPageIndex = getPageCount();
-
- addPageIfNotNull(selectDiagramCategoryPage);
- addPageIfNotNull(selectDiagramKindPage);
- }
-
- /**
- * Adds the page if not null.
- *
- * @param page
- * the page
- */
- protected final void addPageIfNotNull(IWizardPage page) {
- if (page != null) {
- addPage(page);
- }
- }
-
- public boolean isInitModelWizard() {
- return false;
- }
-
- public boolean isCreateProjectWizard() {
- return false;
- }
-
- public boolean isCreateMultipleModelsWizard() {
- return false;
- }
-
- /**
- * Inits the.
- *
- * @param workbench
- * the workbench
- * @param selection
- * the selection {@inheritDoc}
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.workbench = workbench;
-
- initStorageProvider(workbench, selection);
-
- IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
- IDialogSettings section = workbenchSettings.getSection(NEW_MODEL_SETTINGS);
- if (section == null) {
- section = workbenchSettings.addNewSection(NEW_MODEL_SETTINGS);
- }
- setDialogSettings(section);
-
- selectStorageProviderPage = createSelectStorageProviderPage();
-
- for (INewModelStorageProvider next : getStorageProviders()) {
- next.init(this, selection);
- }
-
- selectDiagramCategoryPage = createSelectDiagramCategoryPage();
- selectDiagramKindPage = createSelectDiagramKindPage();
- }
-
- /**
- * Perform finish.
- *
- * @return true, if successful {@inheritDoc}
- */
- @Override
- public boolean performFinish() {
- String[] diagramCategoryIds = getDiagramCategoryIds();
- if (diagramCategoryIds.length == 0) {
- return false;
- }
- String diagramCategoryId = diagramCategoryIds[0];
- final URI newURI = createNewModelURI(diagramCategoryId);
-
- createAndOpenPapyrusModel(newURI, diagramCategoryId);
-
- saveDiagramCategorySettings();
- saveDiagramKindSettings();
-
- return true;
- }
-
- protected URI createNewModelURI(String diagramCategoryID) {
- return getSelectedStorageProvider().createNewModelURI(diagramCategoryID);
- }
-
- /**
- * Creates the and open papyrus model.
- *
- * @param modelSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- * @param diagramCategoryId
- * the diagram category id
- * @return true, if successful
- */
- protected boolean createAndOpenPapyrusModel(URI newURI, String diagramCategoryId) {
-
- if (newURI == null) {
- return false;
- }
-
- ServicesRegistry registry = createServicesRegistry();
- if (registry == null) {
- return false;
- }
-
- try {
- // have to create the model set and populate it with the DI model
- // before initializing other services that actually need the DI
- // model, such as the SashModel Manager service
- ModelSet modelSet = registry.getService(ModelSet.class);
-
- createPapyrusModels(modelSet, newURI);
-
- initServicesRegistry(registry);
-
- initDomainModel(modelSet, newURI, diagramCategoryId);
-
- initDiagramModel(modelSet, diagramCategoryId);
-
- openDiagram(newURI);
- } catch (ServiceException e) {
- Activator.log.error(e);
- return false;
- } finally {
- try {
- registry.disposeRegistry();
- } catch (ServiceException ex) {
- // Ignore
- }
- }
-
- return true;
- }
-
- protected ServicesRegistry createServicesRegistry() {
- ServicesRegistry result = null;
-
- try {
- result = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
- } catch (ServiceException e) {
- // couldn't create the registry? Fatal problem
- Activator.log.error(e);
- }
-
- try {
- // have to create the model set and populate it with the DI model
- // before initializing other services that actually need the DI
- // model, such as the SashModel Manager service
- result.startServicesByClassKeys(ModelSet.class);
- } catch (ServiceException ex) {
- // Ignore this exception: some services may not have been loaded,
- // which is probably normal at this point
- }
-
- return result;
- }
-
- protected void initServicesRegistry(ServicesRegistry registry) throws ServiceException {
- try {
- registry.startRegistry();
- } catch (ServiceException ex) {
- // Ignore this exception: some services may not have been loaded,
- // which is probably normal at this point
- }
-
- registry.getService(IPageManager.class);
- }
-
- /**
- * Gets the diagram category ids.
- *
- * @return the diagram category ids
- */
- protected String[] getDiagramCategoryIds() {
- if (selectDiagramCategoryPage != null) {
- return selectDiagramCategoryPage.getDiagramCategories();
- }
- return null;
- }
-
- /**
- * Gets the diagram file extension.
- *
- * @param diagramCategoryId
- * the diagram category id
- * @return the diagram file extension
- */
- public String getDiagramFileExtension(String diagramCategoryId) {
- return getDiagramFileExtension(diagramCategoryId, NewModelFilePage.DEFAULT_DIAGRAM_EXTENSION);
- }
-
- /**
- * Gets the diagram file extension.
- *
- * @param categoryId
- * the category id
- * @param defaultExtension
- * the default extension
- * @return the diagram file extension
- */
- public String getDiagramFileExtension(String categoryId, String defaultExtension) {
- DiagramCategoryDescriptor diagramCategory = getDiagramCategoryMap().get(categoryId);
- String extensionPrefix = diagramCategory != null ? diagramCategory.getExtensionPrefix() : null;
- return (extensionPrefix != null) ? extensionPrefix + "." + defaultExtension : defaultExtension; //$NON-NLS-1$
- }
-
- /**
- * Creates the select diagram category page.
- *
- * @return the select diagram category page
- */
- protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
- return new SelectDiagramCategoryPage();
- }
+@Deprecated
+public class CreateModelWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard {
+
- /**
- * Creates the select diagram kind page.
- *
- * @return the select diagram kind page
- */
- protected SelectDiagramKindPage createSelectDiagramKindPage() {
- return new SelectDiagramKindPage(new CategoryProvider() {
-
- public String[] getCurrentCategories() {
- return getDiagramCategoryIds();
- }
-
- });
- }
-
- /**
- * Inits the domain model.
- *
- * @param modelSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- * @param diagramCategoryId
- * the diagram category id
- */
- protected void initDomainModel(ModelSet modelSet, final URI newURI, String diagramCategoryId) {
-
- boolean isToInitFromTemplate = selectDiagramKindPage.getTemplatePath() != null;
- if (isToInitFromTemplate) {
- initDomainModelFromTemplate(modelSet);
- } else {
- createEmptyDomainModel(modelSet, diagramCategoryId);
- }
- }
-
- /**
- * Inits the domain model from template.
- *
- * @param modelSet
- * the di resource set
- */
- protected void initDomainModelFromTemplate(ModelSet modelSet) {
- // getCommandStack(modelSet).execute(new InitFromTemplateCommand(modelSet.getTransactionalEditingDomain(), modelSet.getModelResource(), modelSet.getDiResource(), modelSet.getNotationResource(), selectDiagramKindPage.getTemplatePluginId(),
- // selectDiagramKindPage.getTemplatePath(),selectDiagramKindPage.getNotationTemplatePath(),selectDiagramKindPage.getDiTemplatePath()));
- getCommandStack(modelSet).execute(
- new InitFromTemplateCommand(modelSet.getTransactionalEditingDomain(), modelSet, selectDiagramKindPage.getTemplatePluginId(), selectDiagramKindPage.getTemplatePath(), selectDiagramKindPage.getNotationTemplatePath(), selectDiagramKindPage
- .getDiTemplatePath()));
- }
-
- /**
- * Creates the empty domain model.
- *
- * @param modelSet
- * the di resource set
- * @param diagramCategoryId
- * the diagram category id
- */
- protected void createEmptyDomainModel(ModelSet modelSet, String diagramCategoryId) {
- try {
- IModelCreationCommand creationCommand = getDiagramCategoryMap().get(diagramCategoryId).getCommand();
- creationCommand.createModel(modelSet);
- } catch (BackboneException e) {
- log.error(e);
- }
- }
-
- /**
- * Creates the papyrus models.
- *
- * @param modelSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- */
- protected void createPapyrusModels(ModelSet modelSet, URI newURI) {
- RecordingCommand command = new NewPapyrusModelCommand(modelSet, newURI);
- getCommandStack(modelSet).execute(command);
- }
-
- /**
- * Save diagram category settings.
- */
+ @Deprecated
protected void saveDiagramCategorySettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- SettingsHelper settingsHelper = new SettingsHelper(settings);
- settingsHelper.saveDefaultDiagramCategory(getDiagramCategoryIds());
- }
- }
-
- /**
- * Save diagram kind settings.
- */
- protected void saveDiagramKindSettings() {
- IDialogSettings settings = getDialogSettings();
- if (settings == null) {
- return;
- }
- SettingsHelper settingsHelper = new SettingsHelper(settings);
- for (String category : getDiagramCategoryIds()) {
- if (selectDiagramKindPage.isRememberCurrentSelection()) {
- saveDefaultDiagramKinds(settingsHelper, category);
- saveDefaultTemplates(settingsHelper, category);
- } else {
- settingsHelper.saveDefaultDiagramKinds(category, Collections.<String> emptyList());
- settingsHelper.saveDefaultTemplates(category, Collections.<String> emptyList());
- }
- }
- settingsHelper.saveRememberCurrentSelection(selectDiagramKindPage.isRememberCurrentSelection());
- }
-
- /**
- * Save default diagram kinds.
- *
- * @param settingsHelper
- * the settings helper
- * @param category
- * the category
- */
- private void saveDefaultDiagramKinds(SettingsHelper settingsHelper, String category) {
- String[] selected = selectDiagramKindPage.getSelectedDiagramKinds(category);
- settingsHelper.saveDefaultDiagramKinds(category, Arrays.asList(selected));
- }
-
- /**
- * Save default templates.
- *
- * @param settingsHelper
- * the settings helper
- * @param category
- * the category
- */
- private void saveDefaultTemplates(SettingsHelper settingsHelper, String category) {
- if (!selectDiagramKindPage.templatesEnabled()) {
- return;
- }
- String path = selectDiagramKindPage.getTemplatePath();
- settingsHelper.saveDefaultTemplates(category, Collections.singletonList(path));
- }
-
- /**
- * Open diagram.
- *
- * @param newURI
- * the URI of the new model's principal resource
- */
- protected void openDiagram(final URI newURI) {
- IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
- if (page != null) {
- try {
- IEditorInput editorInput = createEditorInput(newURI);
- IDE.openEditor(page, editorInput, getPreferredEditorID(editorInput), true);
- } catch (PartInitException e) {
- log.error(e);
- }
- }
- }
-
- protected IEditorInput createEditorInput(URI uri) {
- return getSelectedStorageProvider().createEditorInput(uri);
- }
-
- protected String getPreferredEditorID(IEditorInput input) throws PartInitException {
- IEditorDescriptor desc;
-
- if (input instanceof IFileEditorInput) {
- desc = IDE.getEditorDescriptor(((IFileEditorInput) input).getFile());
- } else {
- // try to get a URI
- URI uri = null;
- if (input instanceof IURIEditorInput) {
- uri = URI.createURI(((IURIEditorInput) input).getURI().toString(), true);
- } else if (input instanceof URIEditorInput) {
- uri = ((URIEditorInput) input).getURI();
- }
-
- if (uri != null) {
- desc = IDE.getEditorDescriptor(uri.lastSegment());
- } else {
- // hope that the input name is the file name
- desc = IDE.getEditorDescriptor(input.getName());
- }
- }
-
- return (desc == null) ? "org.eclipse.papyrus.infra.core.papyrusEditor" : desc.getId();
- }
-
- /**
- * Inits the diagram model.
- *
- * @param modelSet
- * the di resource set
- * @param categoryId
- * the category id
- */
- protected void initDiagramModel(ModelSet modelSet, String categoryId) {
- initDiagrams(modelSet, categoryId);
- saveDiagram(modelSet);
- }
-
- /**
- * Save diagram.
- *
- * @param modelSet
- * the di resource set
- */
- private void saveDiagram(ModelSet modelSet) {
- try {
- modelSet.save(new NullProgressMonitor());
- } catch (IOException e) {
- log.error(e);
- // return false;
- }
- }
-
- /**
- * Inits the diagrams.
- *
- * @param modelSet
- * the di resource set
- * @param categoryId
- * the category id
- */
- protected void initDiagrams(ModelSet modelSet, String categoryId) {
- initDiagrams(modelSet, null, categoryId);
- }
-
- /**
- * Inits the diagrams.
- *
- * @param resourceSet
- * the resource set
- * @param root
- * the root
- * @param categoryId
- * the category id
- */
- protected void initDiagrams(ModelSet resourceSet, EObject root, String categoryId) {
- // FIXME we cannot properly set the root object
- UmlModel model = (UmlModel) resourceSet.getModel(UmlModel.MODEL_ID);
- EList<EObject> roots = model.getResource().getContents();
- if (!roots.isEmpty()) {
-
- root = roots.get(0);
- }
- List<ViewPrototype> creationCommands = getPrototypesFor(categoryId);
- String diagramName = selectDiagramKindPage.getDiagramName();
- if (creationCommands.isEmpty()) {
- createEmptyDiagramEditor(resourceSet);
- } else {
- for (int i = 0; i < creationCommands.size(); i++) {
- creationCommands.get(i).instantiateOn(root, diagramName);
- }
- }
- }
-
- /**
- * Gets the diagram kinds for.
- *
- * @param categoryId
- * the category id
- * @return the diagram kinds for
- */
- protected List<ViewPrototype> getPrototypesFor(String categoryId) {
- return selectDiagramKindPage.getSelectedPrototypes(categoryId);
- }
-
-
- /**
- * Creates the empty diagram editor.
- *
- * @param modelSet
- * the model set
- */
- private void createEmptyDiagramEditor(ModelSet modelSet) {
- // Create an empty editor (no diagrams opened)
- // Geting an IPageMngr is enough to initialize the
- // SashSystem.
- EditorUtils.getIPageMngr(DiModelUtils.getDiResource(modelSet));
- }
-
- /**
- * Gets the command stack.
- *
- * @param modelSet
- * the model set
- * @return the command stack
- */
- protected final CommandStack getCommandStack(ModelSet modelSet) {
- return modelSet.getTransactionalEditingDomain().getCommandStack();
- }
-
- /**
- * Gets the diagram category map.
- *
- * @return the diagram category map
- */
- protected Map<String, DiagramCategoryDescriptor> getDiagramCategoryMap() {
- return DiagramCategoryRegistry.getInstance().getDiagramCategoryMap();
- }
-
- /**
- * Diagram category changed.
- *
- * @param newCategories
- * the new categories
- * @return the i status
- */
- public IStatus diagramCategoryChanged(String... newCategories) {
- return getSelectedStorageProvider().validateDiagramCategories(newCategories);
- }
-
- protected void initStorageProvider(IWorkbench workbench, IStructuredSelection selection) {
-
- NewModelStorageProviderRegistry registry = new NewModelStorageProviderRegistry((IEvaluationService) workbench.getService(IEvaluationService.class));
-
- // if we are creating a project, then it is in the workspace
- if (isCreateProjectWizard()) {
- this.selectedStorageProvider = new WorkspaceNewModelStorageProvider();
- } else {
- // look for a pre-determined selection
- INewModelStorageProvider firstProvider = null;
- for (INewModelStorageProvider next : registry) {
- if (firstProvider == null) {
- firstProvider = next;
- }
-
- // don't match on empty selections because there is
- // then no context to match against
- if (!selection.isEmpty() && next.canHandle(selection)) {
- this.selectedStorageProvider = next;
- break;
- }
- }
-
- // if the choice is pre-determined, don't show the selection page
- if (this.selectedStorageProvider == null) {
- this.selectedStorageProvider = firstProvider;
-
- // don't need the selection page if only one choice
- if (registry.size() > 1) {
- this.storageProviderRegistry = registry;
- }
- }
- }
- }
-
- protected SelectStorageProviderPage createSelectStorageProviderPage() {
- SelectStorageProviderPage result = (storageProviderRegistry == null) ? null : new SelectStorageProviderPage(storageProviderRegistry);
-
- if (result != null) {
- result.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- INewModelStorageProvider provider = (INewModelStorageProvider) ((IStructuredSelection) event.getSelection()).getFirstElement();
- setSelectedStorageProvider(provider);
- }
- });
- }
-
- return result;
- }
-
- protected Iterable<? extends INewModelStorageProvider> getStorageProviders() {
- Iterable<? extends INewModelStorageProvider> result;
-
- if (storageProviderRegistry != null) {
- result = storageProviderRegistry;
- } else if (selectedStorageProvider != null) {
- result = Collections.singletonList(selectedStorageProvider);
- } else {
- result = Collections.emptyList();
- }
-
- return result;
- }
-
- protected INewModelStorageProvider getSelectedStorageProvider() {
- return selectedStorageProvider;
- }
-
- private void setSelectedStorageProvider(INewModelStorageProvider provider) {
- this.selectedStorageProvider = provider;
-
- // recompute next/previous buttons
- getContainer().updateButtons();
- }
-
- @Override
- public IWizardPage getNextPage(IWizardPage page) {
- final List<IWizardPage> allPages = Arrays.asList(getPages());
- IWizardPage result = null;
-
- INewModelStorageProvider provider = providersByPage.get(page);
- if (provider != null) {
- // it's contributed by a provider. Get the next in the list
- List<IWizardPage> pages = providerPages.get(provider);
- int index = pages.indexOf(page);
- if ((index >= 0) && (index < (pages.size() - 1))) {
- result = pages.get(index + 1);
- } else {
- // get the first page after the provider pages
- if (endProviderPageIndex < allPages.size()) {
- result = allPages.get(endProviderPageIndex);
- }
- }
- } else if (allPages.indexOf(page) == startProviderPageIndex) {
- // get the first page of the selected provider
- List<IWizardPage> pages = providerPages.get(getSelectedStorageProvider());
- if (!pages.isEmpty()) {
- result = pages.get(0);
- } else {
- // get the first page after the provider pages
- if (endProviderPageIndex < allPages.size()) {
- result = allPages.get(endProviderPageIndex);
- }
- }
- } else {
- // somewhere away from the boundary of the provider pages
- result = super.getNextPage(page);
- }
-
- return result;
- }
-
- @Override
- public IWizardPage getPreviousPage(IWizardPage page) {
- final List<IWizardPage> allPages = Arrays.asList(getPages());
- IWizardPage result = null;
-
- INewModelStorageProvider provider = providersByPage.get(page);
- if (provider != null) {
- // it's contributed by a provider. Get the previous in the list
- List<IWizardPage> pages = providerPages.get(provider);
- int index = pages.indexOf(page);
- if (index > 0) {
- result = pages.get(index - 1);
- } else {
- // get the last page before the provider pages
- if (startProviderPageIndex >= 0) {
- result = allPages.get(startProviderPageIndex);
- }
- }
- } else if (allPages.indexOf(page) == endProviderPageIndex) {
- // get the last page of the selected provider
- List<IWizardPage> pages = providerPages.get(getSelectedStorageProvider());
- if (!pages.isEmpty()) {
- result = pages.get(pages.size() - 1);
- } else {
- // get the last page before the provider pages
- if (startProviderPageIndex >= 0) {
- result = allPages.get(startProviderPageIndex);
- }
- }
- } else {
- // somewhere away from the boundary of the provider pages
- result = super.getPreviousPage(page);
- }
-
- return result;
- }
-
- @Override
- public boolean canFinish() {
- boolean result = true;
- final IWizardPage[] allPages = getPages();
-
- // only look at the universal pages and those contributed by the current
- // storage provider
-
- for (int i = 0; result && (i <= startProviderPageIndex); i++) {
- result = allPages[i].isPageComplete();
- }
-
- if (result) {
- for (IWizardPage next : providerPages.get(selectedStorageProvider)) {
- if (!next.isPageComplete()) {
- result = false;
- break;
- }
- }
- }
-
- for (int i = endProviderPageIndex; result && (i < allPages.length); i++) {
- result = allPages[i].isPageComplete();
- }
-
- return result;
- }
-
- /**
- * Queries the user-presentable (translatable) name of the kind of model
- * that I create. For example, "Papyrus UML" or "Papyrus SysML".
- *
- * @return my model kind name
- */
- public String getModelKindName() {
- return "Papyrus";
- }
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateSeveralModelsWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateSeveralModelsWizard.java
index 462650448d4..11bc4705516 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateSeveralModelsWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/CreateSeveralModelsWizard.java
@@ -1,217 +1,24 @@
-/*****************************************************************************
- * Copyright (c) 2010, 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * Creates several new model files - one each selected diagram category.
- * This functionality in under development now.
- */
-// TODO: Provide proper file names for the new model file pages after the first one
-// TODO: Allow the user to skip NewModelFile page and invoke finish in advance.
-public class CreateSeveralModelsWizard extends CreateModelWizard {
-
- /** The my category2model file page map. */
- private Map<String, NewModelFilePage> myCategory2modelFilePageMap = new TreeMap<String, NewModelFilePage>();
-
- /** The my selection. */
- private IStructuredSelection mySelection;
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
- */
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- super.init(workbench, selection);
- this.mySelection = selection;
- }
-
- @Override
- public boolean isCreateMultipleModelsWizard() {
- return true;
- }
-
- @Override
- public IStatus diagramCategoryChanged(String... newCategories) {
- // clean pages
- List<String> newCategoriesList = Arrays.asList(newCategories);
- Collection<String> keys = new HashSet<String>(myCategory2modelFilePageMap.keySet());
- for (String oldCategory : keys) {
- if (!newCategoriesList.contains(oldCategory)) {
- myCategory2modelFilePageMap.remove(oldCategory);
- }
- }
- for (String newCategory : newCategories) {
- if (!myCategory2modelFilePageMap.containsKey(newCategory)) {
- NewModelFilePage newPage = createNewModelFilePage(mySelection, newCategory);
- myCategory2modelFilePageMap.put(newCategory, newPage);
- }
- }
- return super.diagramCategoryChanged(newCategories);
- }
-
- /**
- * Creates the new model file page.
- *
- * @param selection
- * the selection
- * @param categoryId
- * the category id
- * @return the new model file page
- */
- protected NewModelFilePage createNewModelFilePage(IStructuredSelection selection, String categoryId) {
- NewModelFilePage newPage = new NewModelFilePage(
- createModelFilePageId(categoryId), selection, getModelKindName());
- newPage.setWizard(this);
- newPage.setDescription(NLS.bind(Messages.CreateSeveralModelsWizard_new_model_file_page_title, categoryId));
- return newPage;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
- */
- @Override
- public IWizardPage getNextPage(IWizardPage page) {
- String pageId = page.getName();
- if (SelectDiagramKindPage.PAGE_ID.equals(pageId)) {
- String nextKey = myCategory2modelFilePageMap.keySet().iterator().next();
- return myCategory2modelFilePageMap.get(nextKey);
- }
- if (isModelFilePageId(pageId) && myCategory2modelFilePageMap.containsKey(getCategoryForPage(pageId))) {
- String category = getCategoryForPage(pageId);
- Iterator<String> iterator = myCategory2modelFilePageMap.keySet().iterator();
- while (iterator.hasNext()) {
- if (category.equals(iterator.next())) {
- if (iterator.hasNext()) {
- String nextKey = iterator.next();
- return myCategory2modelFilePageMap.get(nextKey);
- }
- }
- }
- return null;
- }
- return super.getNextPage(page);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.Wizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
- */
- @Override
- public IWizardPage getPreviousPage(IWizardPage page) {
- // TODO allow navigation between pages
- return super.getPreviousPage(page);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#createSelectDiagramCategoryPage()
- */
- @Override
- protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
- return new SelectDiagramCategoryPage(true);
- }
-
- /**
- * Perform finish.
- *
- * @return true, if successful {@inheritDoc}
- */
- @Override
- public boolean performFinish() {
- for (String category : getDiagramCategoryIds()) {
-
- final URI newURI = createNewModelURI(category);
- createAndOpenPapyrusModel(newURI, category);
- }
-
- saveDiagramCategorySettings();
- saveDiagramKindSettings();
- return true;
- }
-
- @Override
- protected URI createNewModelURI(String category) {
- NewModelFilePage newModelFilePage = myCategory2modelFilePageMap.get(category);
- if (newModelFilePage == null) {
- Activator.log.error(NLS.bind(Messages.CreateSeveralModelsWizard_cannot_initiate_page, category), new Exception());
- return null;
- }
-
- IFile file = newModelFilePage.createNewFile();
- return URI.createPlatformResourceURI(file.getFullPath().toString(), true);
- }
-
- /**
- * Creates the model file page id.
- *
- * @param categoryId
- * the category id
- * @return the string
- */
- private static String createModelFilePageId(String categoryId) {
- return NEW_MODEL_FILE_PAGE_PREFIX + categoryId;
- }
-
- /**
- * Checks if is model file page id.
- *
- * @param pageId
- * the page id
- * @return true, if is model file page id
- */
- private static boolean isModelFilePageId(String pageId) {
- return pageId.startsWith(NEW_MODEL_FILE_PAGE_PREFIX);
- }
-
- /**
- * Gets the category for page.
- *
- * @param pageId
- * the page id
- * @return the category for page
- */
- private static String getCategoryForPage(String pageId) {
- return pageId.substring(NEW_MODEL_FILE_PAGE_PREFIX.length());
- }
-
- /** The Constant NEW_MODEL_FILE_PAGE_PREFIX. */
- private static final String NEW_MODEL_FILE_PAGE_PREFIX = NewModelFilePage.PAGE_ID + "_"; //$NON-NLS-1$
-
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateSeveralModelsWizard}
+ */
+
+@Deprecated
+public class CreateSeveralModelsWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateSeveralModelsWizard {
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/INewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/INewModelStorageProvider.java
index cc80baa49aa..375a75ad559 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/INewModelStorageProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/INewModelStorageProvider.java
@@ -1,108 +1,23 @@
-/*****************************************************************************
- * 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.diagram.wizards;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-
-/**
- * A protocol for a provider of pluggable wizard pages and resource creation for
- * the {@link CreateModelWizard}. Implementations are contributed on the <tt>org.eclipse.papyrus.uml.diagram.wizards.newModelStorageProviders</tt> extension point.
- */
-public interface INewModelStorageProvider {
-
- /**
- * Queries whether I am an appropriate storage provider for the context
- * implied by the specified selection on which the wizard is launched. For
- * example, if the selection includes resources stored in my domain.
- *
- * @param initialSelection
- * the workbench or other selection on which the wizard was
- * launched
- *
- * @return whether I am appropriate for the selection
- */
- boolean canHandle(IStructuredSelection initialSelection);
-
- void init(CreateModelWizard wizard, IStructuredSelection selection);
-
- List<? extends IWizardPage> createPages();
-
- IStatus validateDiagramCategories(String... newCategories);
-
- /**
- * Create the URI identifying a new model, as indicated by my wizard page
- * that (presumably) allowed the user to specify the model's location within
- * my storage domain.
- *
- * @param diagramCategoryID
- * the ID of the diagram category selected in the wizard
- *
- * @return the URI of the new model's principal resource
- */
- URI createNewModelURI(String diagramCategoryID);
-
- /**
- * Create an editor input appropriate for opening the specified URI in my
- * storage domain.
- *
- * @param uri
- * the URI of the principal model resource to open
- *
- * @return a suitable editor input (must not be {@code null}). If the result
- * is not an {@link IFileEditorInput} or other known input type that
- * correlates to the resource URI, then it is expected that the
- * input's name be the resource name so that the best-matching
- * editor may be found to open it
- */
- IEditorInput createEditorInput(URI uri);
-
- /**
- * Creates a part for the storage provider selection page of the wizard.
- *
- * @return the storage-provider selection page part, or {@code null} if none
- * is required
- */
- ISelectProviderPart createSelectProviderPart();
-
- //
- // Nested types
- //
-
- interface ISelectProviderPart {
-
- Control createControl(Composite parent);
-
- boolean isEnabled();
-
- void setEnabled(boolean enabled);
-
- boolean isPartComplete();
-
- void addPartCompleteListener(IPartCompleteListener listener);
-
- void removePartCompleteListener(IPartCompleteListener listener);
-
- interface IPartCompleteListener {
-
- void partCompletenessChanged(ISelectProviderPart part);
- }
- }
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.providers.INewModelStorageProvider}
+ *
+ */
+@Deprecated
+public interface INewModelStorageProvider extends org.eclipse.papyrus.uml.diagram.wizards.providers.INewModelStorageProvider {
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitDiagramAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitDiagramAction.java
deleted file mode 100644
index 7a7be0d9f64..00000000000
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitDiagramAction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Obeo.
- * 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:
- * Obeo - initial API and implementation
- *******************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-/**
- * This action initialize the "CreateModelWizard" with the selected domain file,
- * and launch the wizard to create Diagram Interchange resources required by
- * Papyrus editor.
- *
- * @author <a href="mailto:jerome.benois@obeo.fr">Jerome Benois</a>
- */
-public abstract class InitDiagramAction implements IObjectActionDelegate {
-
- /** The active part. */
- private IWorkbenchPart targetPart;
-
- /** The current selection;. */
- IStructuredSelection mySelection;
-
- /**
- * Sets the active part.
- *
- * @param action
- * the action
- * @param targetPart
- * the target part {@inheritDoc}
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- this.targetPart = targetPart;
- }
-
- /**
- * Selection changed.
- *
- * @param action
- * the action
- * @param selection
- * the selection {@inheritDoc}
- */
- public void selectionChanged(IAction action, ISelection selection) {
- IStructuredSelection sselection = (IStructuredSelection) selection;
- mySelection = sselection;
- action.setEnabled(InitModelWizard.isSupportedDomainModelFile(sselection));
- }
-
- /**
- * Gets the shell.
- *
- * @return the current Shell to display dialog
- */
- private Shell getShell() {
- return targetPart.getSite().getShell();
- }
-
- /**
- * Run.
- *
- * @param action
- * the action {@inheritDoc}
- */
- public void run(IAction action) {
- InitModelWizard wizard = new InitModelWizard();
- wizard.init(targetPart.getSite().getWorkbenchWindow().getWorkbench(), mySelection);
- WizardDialog dialog = new WizardDialog(getShell(), wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
-
-}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitModelWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitModelWizard.java
index 86904e51ff4..620f97d1860 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitModelWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/InitModelWizard.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2013 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,279 +7,18 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.getSelectedResourceURI;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.uml.diagram.wizards.category.PapyrusModelFromExistingDomainModelCommand;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage.CategoryProvider;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectRootElementPage;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.ui.IWorkbench;
+package org.eclipse.papyrus.uml.diagram.wizards;
/**
- *
- * The New Papyrus Model Wizard.
- * If being invoke on the *.uml file - initializes a new Papyrus diagram for the selected domain model.
- * If is selected is empty or in not uml - creates a new Papyrus Model.
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard}
+ *
*/
-public class InitModelWizard extends CreateModelWizard {
-
- /** Select the root element containing the new diagram. */
- private SelectRootElementPage selectRootElementPage;
-
- /** The is init from existing domain model. */
- private boolean isInitFromExistingDomainModel;
-
- @Override
- public boolean isInitModelWizard() {
- return true;
- }
-
- /**
- * Inits the.
- *
- * @param workbench
- * the workbench
- * @param selection
- * the selection {@inheritDoc}
- */
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- URI uri = getSelectedResourceURI(selection);
- isInitFromExistingDomainModel = isSupportedDomainModelResource(uri);
- super.init(workbench, selection);
- selectRootElementPage = createSelectRootElementPage(selection);
- if (isCreateFromExistingDomainModel()) {
- // Init Model not Create a new one
- setWindowTitle(Messages.InitModelWizard_init_papyrus_diagram);
- }
- }
-
- /**
- * Creates the select root element page.
- *
- * @param selection
- * the initial workbench selection
- * @return the select root element page
- */
- protected SelectRootElementPage createSelectRootElementPage(IStructuredSelection selection) {
- if (!isCreateFromExistingDomainModel()) {
- // create model - nothing to choose from
- return null;
- }
- return new SelectRootElementPage(selection);
- }
-
- /**
- * Creates the select diagram kind page.
- *
- * @return the select diagram kind page {@inheritDoc}
- */
- @Override
- protected SelectDiagramKindPage createSelectDiagramKindPage() {
- if (isCreateFromExistingDomainModel()) {
- return new SelectDiagramKindPage(false, new CategoryProvider() {
-
- public String[] getCurrentCategories() {
- return getDiagramCategoryIds();
- }
-
- }, SelectDiagramKindPage.DEFAULT_CREATION_COMMAND_REGISTRY);
- }
- ;
- return super.createSelectDiagramKindPage();
- }
-
- /**
- * Adds the pages.
- *
- * {@inheritDoc}
- */
- @Override
- public void addPages() {
- super.addPages();
- addPageIfNotNull(selectRootElementPage);
- };
-
- /**
- * Returns true is the file can be served as a model model for the diagram.
- *
- * @param file
- * the file
- * @return true, if is supported domain model file
- */
- public static boolean isSupportedDomainModelFile(IFile file) {
- // if(file != null && UmlModel.UML_FILE_EXTENSION.equals(file.getFileExtension())){System.err.println("is SupportedDomainModelFile");}
- // else {System.err.println("not SupportedDomainModelFile");}
- return file != null && isSupportedDomainModelResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true));
- }
-
- /**
- * Returns true if the resource can be served as a model model for the diagram.
- *
- * @param uri
- * the resource's URI
- * @return true, if is supported domain model resource
- */
- public static boolean isSupportedDomainModelResource(URI uri) {
- return (uri != null) && UmlModel.UML_FILE_EXTENSION.equals(uri.fileExtension());
- }
-
- /**
- * Checks if is supported domain model file.
- *
- * @param sselection
- * the sselection
- * @return true, if is supported domain model file
- */
- public static boolean isSupportedDomainModelFile(IStructuredSelection sselection) {
- URI uri = getSelectedResourceURI(sselection);
- return isSupportedDomainModelResource(uri);
- }
-
- /**
- * Creates the papyrus models.
- *
- * @param diResourceSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- */
- @Override
- protected void createPapyrusModels(ModelSet modelSet, URI newURI) {
- if (isCreateFromExistingDomainModel()) {
- RecordingCommand command = new PapyrusModelFromExistingDomainModelCommand(modelSet, newURI, getRoot());
- getCommandStack(modelSet).execute(command);
- } else {
- super.createPapyrusModels(modelSet, newURI);
- }
- }
-
- /**
- * Inits the domain model.
- *
- * @param diResourceSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- * @param diagramCategoryId
- * the diagram category id {@inheritDoc}
- */
- @Override
- protected void initDomainModel(ModelSet modelSet, final URI newURI, String diagramCategoryId) {
- if (isCreateFromExistingDomainModel()) {
- // We force the creation of the di file
- modelSet.createResource(newURI);
- } else {
- super.initDomainModel(modelSet, newURI, diagramCategoryId);
- }
- }
-
- /**
- * Inits the diagrams.
- *
- * @param diResourceSet
- * the di resource set
- * @param categoryId
- * the category id {@inheritDoc}
- */
- @Override
- protected void initDiagrams(ModelSet modelSet, String categoryId) {
- initDiagrams(modelSet, getRoot(), categoryId);
- }
-
- /**
- * Checks if is creates the from existing domain model.
- *
- * @return true, if is creates the from existing domain model
- */
- public boolean isCreateFromExistingDomainModel() {
- return isInitFromExistingDomainModel;
- }
-
- @Override
- public String getDiagramFileExtension(String diagramCategoryId) {
- if (isCreateFromExistingDomainModel()) {
- return NewModelFilePage.DEFAULT_DIAGRAM_EXTENSION;
- }
- return super.getDiagramFileExtension(diagramCategoryId);
- }
-
- /**
- * Gets the root.
- *
- * @return the root
- */
- private EObject getRoot() {
- if (selectRootElementPage != null) {
- return selectRootElementPage.getModelElement();
- }
- return null;
- }
-
- /**
- * The Class NewDiagramForExistingModelPage.
- */
- protected static class NewDiagramForExistingModelPage extends NewModelFilePage {
-
- /** The my diagram file name. */
- private String myDiagramFileName;
-
- /**
- * Instantiates a new new diagram for existing model page.
- *
- * @param selection
- * the selection
- * @param defaultFileName
- * the default file name
- * @param modelKindName
- * the user-presentable (translatable) name of the kind of
- * model to create
- * @param diagramExtension
- * the diagram extension
- */
- public NewDiagramForExistingModelPage(IStructuredSelection selection, String modelKindName, String defaultFileName, String diagramExtension) {
-
- super(selection, modelKindName);
-
- myDiagramFileName = defaultFileName;
- setFileName(defaultFileName);
- setFileExtension(diagramExtension);
- setTitle(Messages.InitModelWizard_init_papyrus_model);
- setDescription(Messages.InitModelWizard_init_papyrus_model_desc);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#validatePage()
- */
- @Override
- protected boolean validatePage() {
- if (!super.validatePage()) {
- return false;
- }
- if (!myDiagramFileName.equals(getFileName())) {
- setErrorMessage(NLS.bind(Messages.InitModelWizard_diagram_name_is_different_from_domain_model, myDiagramFileName));
- return false;
- }
- return true;
- };
+@Deprecated
+public class InitModelWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard {
- }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/Messages.java
index e9ac7bb6952..0da9daf6df0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/Messages.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/Messages.java
@@ -1,138 +1,25 @@
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import org.eclipse.osgi.util.NLS;
-
-// TODO: Auto-generated Javadoc
-/**
- * The Class Messages.
- */
-public class Messages extends NLS {
-
- /** The Constant BUNDLE_NAME. */
- private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
-
- /** The Create model wizard_new_papyrus_model_title. */
- public static String CreateModelWizard_new_papyrus_model_title;
-
- /** The Create several models wizard_cannot_initiate_page. */
- public static String CreateSeveralModelsWizard_cannot_initiate_page;
-
- /** The Create several models wizard_new_model_file_page_title. */
- public static String CreateSeveralModelsWizard_new_model_file_page_title;
-
- /** The Init model wizard_diagram_name_is_different_from_domain_model. */
- public static String InitModelWizard_diagram_name_is_different_from_domain_model;
-
- /** The Init model wizard_init_papyrus_diagram. */
- public static String InitModelWizard_init_papyrus_diagram;
-
- /** The Init model wizard_init_papyrus_model. */
- public static String InitModelWizard_init_papyrus_model;
-
- /** The Init model wizard_init_papyrus_model_desc. */
- public static String InitModelWizard_init_papyrus_model_desc;
-
- /** The New papyrus project with multi models wizard_exception_on_project_opening. */
- public static String NewPapyrusProjectWithMultiModelsWizard_exception_on_project_opening;
-
- /** The New papyrus project wizard_exception_on_opening. */
- public static String NewPapyrusProjectWizard_exception_on_opening;
-
- /** The New papyrus project wizard_new_papyrus_project. */
- public static String NewPapyrusProjectWizard_new_papyrus_project;
-
- /** The New papyrus project wizard_papyrus_project. */
- public static String NewPapyrusProjectWizard_papyrus_project;
-
- /** The New papyrus project wizard_papyrus_project_desc. */
- public static String NewPapyrusProjectWizard_papyrus_project_desc;
-
- /** The Diagram category registry_bad_class_name_of_category. */
- public static String DiagramCategoryRegistry_bad_class_name_of_category;
-
- /** The Diagram kind label provider_undefined_element. */
- public static String DiagramKindLabelProvider_undefined_element;
-
- /** The Model templates label provider_model_template_description_text. */
- public static String ModelTemplatesLabelProvider_model_template_description_text;
-
- /** The New model file page_3. */
- public static String NewModelFilePage_3;
-
- /** The New model file page_default_diagram_name. */
- public static String NewModelFilePage_default_diagram_name;
-
- /** The New model file page_diagram_file_was_renamed. */
- public static String NewModelFilePage_diagram_file_was_renamed;
-
- /** The New model file page_new_diagram_category_needs_specific_extension. */
- public static String NewModelFilePage_new_diagram_category_needs_specific_extension;
-
- /** The New model file page_page_desc. */
- public static String NewModelFilePage_page_desc;
-
- /** The Select diagram category page_cannot_find_category. */
- public static String SelectDiagramCategoryPage_cannot_find_category;
-
- /** The Select diagram category page_diagram_language_group. */
- public static String SelectDiagramCategoryPage_diagram_language_group;
-
- /** The Select diagram category page_select_language. */
- public static String SelectDiagramCategoryPage_select_language;
-
- /** The Select diagram category page_select_one_category. */
- public static String SelectDiagramCategoryPage_select_one_category;
-
- /** The Select diagram kind page_default_diagram_name. */
- public static String SelectDiagramKindPage_default_diagram_name;
-
- /** The Select diagram kind page_diagram_name_group. */
- public static String SelectDiagramKindPage_diagram_name_group;
-
- /** The Select diagram kind page_diagram_name_is_empty. */
- public static String SelectDiagramKindPage_diagram_name_is_empty;
-
- /** The Select diagram kind page_load_template_group. */
- public static String SelectDiagramKindPage_load_template_group;
-
- /** The Select diagram kind page_page_desc. */
- public static String SelectDiagramKindPage_page_desc;
-
- /** The Select diagram kind page_page_title. */
- public static String SelectDiagramKindPage_page_title;
-
- /** The Select diagram kind page_remember_current_selection_text. */
- public static String SelectDiagramKindPage_remember_current_selection_text;
-
- /** The Select diagram kind page_remember_current_selection_tooltip. */
- public static String SelectDiagramKindPage_remember_current_selection_tooltip;
-
- /** The Select diagram kind page_select_kind_group. */
- public static String SelectDiagramKindPage_select_kind_group;
-
- /** The Select root element page_select_root_element_desc. */
- public static String SelectRootElementPage_select_root_element_desc;
-
- /** The Select root element page_select_root_element_title. */
- public static String SelectRootElementPage_select_root_element_title;
-
- public static String ModelCopyWizard_AlreadyyExists;
- public static String ModelCopyWizard_CannotCreateCopy;
- public static String ModelCopyWizard_CannotOpenFIle;
- public static String ModelCopyWizard_ChooseOtherParentFolder;
- public static String ModelCopyWizard_CopyModel;
- public static String ModelCopyWizard_CreatePapyrusExample;
- public static String ModelCopyWizard_DoNotChangeFileName;
- public static String ModelCopyWizard_SelectParentFolder;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Instantiates a new messages.
- */
- private Messages() {
- }
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.messages.Messages}
+ */
+@Deprecated
+public class Messages extends org.eclipse.papyrus.uml.diagram.wizards.messages.Messages {
+
+
+ private Messages() {
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/ModelCopyWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/ModelCopyWizard.java
index b2aa908c05f..d55ffc31c15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/ModelCopyWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/ModelCopyWizard.java
@@ -1,175 +1,30 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * Ansgar Radermacher ansgar.radermacher@cea.fr
- *
- *****************************************************************************/
-
-
-package org.eclipse.papyrus.uml.diagram.wizards;
-
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.ui.part.FileEditorInput;
-
-/**
- * An abstract wizard that can be used for copying model pages. Concrete examples need to
- * inherit from this class and specify model name and location.
- *
- */
-abstract public class ModelCopyWizard extends Wizard implements INewWizard {
-
- private static final String EXT_DI = ".di"; //$NON-NLS-1$
-
- private static final String EXT_NOTATION = ".notation"; //$NON-NLS-1$
-
- private static final String EXT_UML = ".uml"; //$NON-NLS-1$
-
- private IStructuredSelection selection;
-
- /**
- * The model name (without extension)
- */
- protected String modelName;
-
- /**
- * The model location
- */
- protected String modelLocation;
-
- /**
- * Constructor taking modelName as parameter. Default location in
- * models/examples is used
- *
- * @param modelName
- * the name of the example (without extension)
- */
- protected ModelCopyWizard(String modelName) {
- this.modelName = modelName;
- this.modelLocation = "/models/examples/"; //$NON-NLS-1$
- }
-
- /**
- * Constructor taking modelName (without extension) and location as parameters
- *
- * @param modelName
- * the name of the example (without extension)
- * @param modelLocation
- * location of the model relative to the plug-in in which it is contained
- */
- protected ModelCopyWizard(String modelName, String modelLocation) {
- this.modelName = modelName;
- this.modelLocation = modelLocation;
- }
-
- protected WizardNewFileCreationPage selectionPage;
-
- @Override
- public boolean performFinish() {
- // String fileName = diagramModelFilePage.getFileName();
- IFile model = copyModel(modelName);
-
- if (model == null) {
- return false;
- }
-
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchPage page = wb.getActiveWorkbenchWindow().getActivePage();
- try {
- IEditorDescriptor desc = wb.getEditorRegistry().getDefaultEditor(modelName + EXT_DI);
- IEditorInput input = new FileEditorInput(model);
- page.openEditor(input, desc.getId(), false);
- } catch (PartInitException e) {
- // log.error(e);
- return false;
- }
- return true;
- }
-
- /**
- * Copy a model (.di/.notation/.uml) into the selected destination folder
- *
- * @param sourceModelName
- */
- public IFile copyModel(String sourceModelName) {
- try {
- IFile model = copyFile(sourceModelName + EXT_DI);
- copyFile(sourceModelName + EXT_NOTATION);
- copyFile(sourceModelName + EXT_UML);
- return model;
- } catch (CoreException e) {
- Shell shell = new Shell();
- String reason = e.getMessage();
- if (reason.endsWith(Messages.ModelCopyWizard_AlreadyyExists)) {
- reason += "\n" + //$NON-NLS-1$
- Messages.ModelCopyWizard_ChooseOtherParentFolder;
- }
- MessageDialog.openError(shell, Messages.ModelCopyWizard_CannotCreateCopy, reason);
- return null;
- }
- }
-
- /**
- * copy a source file into the selected destination folder
- *
- * @param sourceFileName
- */
- public IFile copyFile(String sourceFileName) throws CoreException {
- IPath destPath = selectionPage.getContainerFullPath();
- InputStream is = getClass().getResourceAsStream(modelLocation + sourceFileName);
- if (is != null) {
- destPath = destPath.append(sourceFileName);
- IFile destFile = ResourcesPlugin.getWorkspace().getRoot().getFile(destPath);
- destFile.create(is, false, null);
- return destFile;
- }
- else {
- throw new CoreException(new Status(0, Activator.PLUGIN_ID,
- String.format(Messages.ModelCopyWizard_CannotOpenFIle, modelLocation + sourceFileName)));
- }
- }
-
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- // this.workbench = workbench;
- this.selection = selection;
- setWindowTitle(Messages.ModelCopyWizard_CreatePapyrusExample);
- setNeedsProgressMonitor(true);
- }
-
-
- /**
- * @generated
- */
- @Override
- public void addPages() {
- selectionPage = new WizardNewFileCreationPage(Messages.ModelCopyWizard_CopyModel, selection);
- selectionPage.setTitle(String.format(Messages.ModelCopyWizard_SelectParentFolder, modelName));
- selectionPage.setDescription(Messages.ModelCopyWizard_DoNotChangeFileName);
- selectionPage.setFileName(modelName);
- addPage(selectionPage);
- }
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.ModelCopyWizard}
+ */
+@Deprecated
+public class ModelCopyWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.ModelCopyWizard {
+
+ protected ModelCopyWizard(String modelName) {
+ super(modelName);
+ }
+
+ protected ModelCopyWizard(String modelName, String modelLocation) {
+ super(modelName, modelLocation);
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewModelStorageProviderRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewModelStorageProviderRegistry.java
index 2f1e7de0d25..3cd74bbe0d6 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewModelStorageProviderRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewModelStorageProviderRegistry.java
@@ -1,232 +1,30 @@
-/*****************************************************************************
- * 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.diagram.wizards;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.expressions.EvaluationContext;
-import org.eclipse.core.expressions.EvaluationResult;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.ExpressionConverter;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.services.IEvaluationService;
-
-/**
- * This is the NewModelStorageProviderRegistry type. Enjoy.
- */
-public class NewModelStorageProviderRegistry
- implements Iterable<NewModelStorageProviderRegistry.Descriptor> {
-
- private static final String EXTPT_ID = Activator.PLUGIN_ID
- + ".newModelStorageProviders";
-
- private final List<Descriptor> descriptors = new java.util.ArrayList<Descriptor>();
-
- private final IEvaluationService evaluationService;
-
- public NewModelStorageProviderRegistry(IEvaluationService evaluationService) {
- this.evaluationService = evaluationService;
-
- for (IConfigurationElement config : sort(Platform
- .getExtensionRegistry().getConfigurationElementsFor(EXTPT_ID))) {
-
- if ("provider".equals(config.getName())) {
- descriptors.add(new Descriptor(config));
- }
- }
- }
-
- public Iterator<Descriptor> iterator() {
- return descriptors.iterator();
- }
-
- public int size() {
- return descriptors.size();
- }
-
- // sort configuration elements by contributing plug-in. Our own first, all
- // others as they come
- private List<IConfigurationElement> sort(
- IConfigurationElement[] providerElements) {
-
- List<IConfigurationElement> result = new java.util.ArrayList<IConfigurationElement>(
- Arrays.asList(providerElements));
-
- Collections.sort(result, new Comparator<IConfigurationElement>() {
-
- public int compare(IConfigurationElement o1,
- IConfigurationElement o2) {
-
- int result;
-
- String plugin1 = o1.getContributor().getName();
- String plugin2 = o2.getContributor().getName();
-
- if (plugin1.equals(plugin2)) {
- result = 0;
- } else if (Activator.PLUGIN_ID.equals(plugin1)) {
- result = -1;
- } else if (Activator.PLUGIN_ID.equals(plugin2)) {
- result = +1;
- } else {
- result = 0;
- }
-
- return result;
- }
- });
-
- return result;
- }
-
- //
- // Nested types
- //
-
- public class Descriptor
- implements INewModelStorageProvider {
-
- private final IConfigurationElement config;
-
- private String label;
-
- private Expression matchSelection;
-
- private INewModelStorageProvider instance;
-
- Descriptor(IConfigurationElement config) {
- this.config = config;
-
- this.label = config.getAttribute("name");
-
- initMatchExpression(config);
- }
-
- public String getLabel() {
- return label;
- }
-
- INewModelStorageProvider getInstance() {
- if (instance == null) {
- try {
- instance = (INewModelStorageProvider) config
- .createExecutableExtension("class");
- } catch (ClassCastException e) {
- Activator.log
- .error(
- "Storage provider does not implement INewModelStorageProvider interface.",
- e);
- } catch (Exception e) {
- Activator.log.error(
- "Could not instantiate storage provider.", e);
- }
-
- if (instance == null) {
- instance = new NullProvider();
- }
- }
-
- return instance;
- }
-
- public boolean canHandle(IStructuredSelection initialSelection) {
- boolean result;
-
- if (matchSelection != null) {
- List<?> selection = initialSelection.toList();
- IEvaluationContext ctx = new EvaluationContext(
- evaluationService.getCurrentState(), selection);
- ctx.addVariable("selection", selection);
-
- EvaluationResult evalResult = EvaluationResult.FALSE;
- try {
- evalResult = matchSelection.evaluate(ctx);
- } catch (CoreException e) {
- Activator.getDefault().getLog().log(e.getStatus());
- }
-
- result = EvaluationResult.TRUE.equals(evalResult);
- } else {
- result = getInstance().canHandle(initialSelection);
- }
-
- return result;
- }
-
- public void init(CreateModelWizard wizard,
- IStructuredSelection selection) {
- getInstance().init(wizard, selection);
- }
-
- public List<? extends IWizardPage> createPages() {
- return getInstance().createPages();
- }
-
- public URI createNewModelURI(String diagramCategoryID) {
- return getInstance().createNewModelURI(diagramCategoryID);
- }
-
- public IEditorInput createEditorInput(URI uri) {
- return getInstance().createEditorInput(uri);
- }
-
- public IStatus validateDiagramCategories(String... newCategories) {
- return getInstance().validateDiagramCategories(newCategories);
- }
-
- public ISelectProviderPart createSelectProviderPart() {
- return getInstance().createSelectProviderPart();
- }
-
- private void initMatchExpression(IConfigurationElement parentConfig) {
- IConfigurationElement[] configs = parentConfig
- .getChildren("enablement");
- if (configs.length > 0) {
- try {
- matchSelection = ExpressionConverter.getDefault().perform(
- configs[0]);
- } catch (CoreException e) {
- Activator.getDefault().getLog().log(e.getStatus());
- }
- }
- }
- }
-
- private static final class NullProvider
- extends AbstractNewModelStorageProvider {
-
- public boolean canHandle(IStructuredSelection initialSelection) {
- return false;
- }
-
- public List<? extends IWizardPage> createPages() {
- return Collections.emptyList();
- }
-
- public URI createNewModelURI(String diagramCategoryID) {
- return null; // I don't create models
- }
-
- }
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+import org.eclipse.ui.services.IEvaluationService;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.providers.NewModelStorageProviderRegistry}
+ *
+ */
+
+@Deprecated
+public class NewModelStorageProviderRegistry extends org.eclipse.papyrus.uml.diagram.wizards.providers.NewModelStorageProviderRegistry {
+
+ public NewModelStorageProviderRegistry(IEvaluationService evaluationService) {
+ super(evaluationService);
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java
index ce6bd760f0b..73e7e156c15 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWithMultiModelsWizard.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2013 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,90 +7,17 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+package org.eclipse.papyrus.uml.diagram.wizards;
/**
- * The Wizard creates a new Project and a several Papyrus Models of different categories inside it.
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWithMultiModelsWizard}
+ *
*/
-public class NewPapyrusProjectWithMultiModelsWizard extends NewPapyrusProjectWizard {
-
- /** The my do not create model for no diagrams. */
- private boolean myDoNotCreateModelForNoDiagrams;
-
- /** The Constant WIZARD_ID. */
- public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.1createproject.several"; //$NON-NLS-1$
-
-
- /**
- * Instantiates a new new papyrus project with multi models wizard.
- */
- public NewPapyrusProjectWithMultiModelsWizard() {
- this(false);
- }
-
- /**
- * Instantiates a new new papyrus project with multi models wizard.
- *
- * @param doNotCreateModelForNoDiagrams
- * the do not create model for no diagrams
- */
- public NewPapyrusProjectWithMultiModelsWizard(boolean doNotCreateModelForNoDiagrams) {
- myDoNotCreateModelForNoDiagrams = doNotCreateModelForNoDiagrams;
- }
-
- @Override
- public boolean isCreateMultipleModelsWizard() {
- return true;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#createSelectDiagramCategoryPage()
- */
- @Override
- protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
- return new SelectDiagramCategoryPage(true);
- }
-
- /**
- * Perform finish.
- *
- * @return true, if successful {@inheritDoc}
- */
- @Override
- public boolean performFinish() {
- IProject newProjectHandle;
- try {
- newProjectHandle = createNewProject();
- } catch (CoreException e) {
- Activator.log.error(Messages.NewPapyrusProjectWithMultiModelsWizard_exception_on_project_opening, e);
- return false;
- }
- if (newProjectHandle == null) {
- return false;
- }
- for (String category : getDiagramCategoryIds()) {
- if (myDoNotCreateModelForNoDiagrams && getPrototypesFor(category).isEmpty()) {
- // don't create model
- continue;
- }
- final URI newURI = createNewModelURI(category);
- createAndOpenPapyrusModel(newURI, category);
- }
-
- saveDiagramCategorySettings();
- saveDiagramKindSettings();
- return true;
- }
+@Deprecated
+public class NewPapyrusProjectWithMultiModelsWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWithMultiModelsWizard {
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWizard.java
index a64becd3c7d..e07f82e8a99 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWizard.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewPapyrusProjectWizard.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2013 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,154 +7,17 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
+
package org.eclipse.papyrus.uml.diagram.wizards;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
/**
- * The Wizard creates a new Project and a Papyrus Model inside it.
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard}
*/
-public class NewPapyrusProjectWizard extends CreateModelWizard {
-
- /** The Constant WIZARD_ID. */
- public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.1createproject"; //$NON-NLS-1$
-
- /** The new project page. */
- private WizardNewProjectCreationPage myNewProjectPage;
-
- /** The initial project name. */
- private String initialProjectName;
-
- @Override
- public boolean isCreateProjectWizard() {
- return true;
- }
-
- /**
- * Inits the.
- *
- * @param workbench
- * the workbench
- * @param selection
- * the selection {@inheritDoc}
- */
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- super.init(workbench, selection);
- setWindowTitle(Messages.NewPapyrusProjectWizard_new_papyrus_project);
- myNewProjectPage = createNewProjectCreationPage();
- }
-
- /**
- * Creates the new project creation page.
- *
- * @return the wizard new project creation page
- */
- protected WizardNewProjectCreationPage createNewProjectCreationPage() {
- WizardNewProjectCreationPage newProjectPage = new WizardNewProjectCreationPage("papyrusNewProjectPage"); //$NON-NLS-1$
- newProjectPage.setInitialProjectName(initialProjectName);
- newProjectPage.setTitle(Messages.NewPapyrusProjectWizard_papyrus_project);
- newProjectPage.setDescription(Messages.NewPapyrusProjectWizard_papyrus_project_desc);
- return newProjectPage;
- }
-
- /**
- * Adds the pages.
- *
- * {@inheritDoc}
- */
- @Override
- public void addPages() {
- addPage(myNewProjectPage);
- super.addPages();
- }
-
- /**
- * Perform finish.
- *
- * @return true, if successful {@inheritDoc}
- */
- @Override
- public boolean performFinish() {
- IProject newProjectHandle;
- try {
- newProjectHandle = createNewProject();
- } catch (CoreException e) {
- Activator.log.error(Messages.NewPapyrusProjectWizard_exception_on_opening, e);
- return false;
- }
- if (newProjectHandle == null) {
- return false;
- }
- return super.performFinish();
- }
-
- /**
- * Creates the new project.
- *
- * @return the i project
- * @throws CoreException
- * the core exception
- */
- protected IProject createNewProject() throws CoreException {
- // get a project handle
- final IProject project = myNewProjectPage.getProjectHandle();
-
- // get a project descriptor
- java.net.URI projectLocationURI = null;
- if (!myNewProjectPage.useDefaults()) {
- projectLocationURI = myNewProjectPage.getLocationURI();
- }
-
- IProjectDescription projectDescription = null;
- NullProgressMonitor progressMonitor = new NullProgressMonitor();
- if (!project.exists())
- {
- projectDescription = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
- if (projectLocationURI != null)
- {
- projectDescription.setLocationURI(projectLocationURI);
- }
- project.create(projectDescription, new SubProgressMonitor(progressMonitor, 1));
- project.open(new SubProgressMonitor(progressMonitor, 1));
- }
- else
- {
- projectDescription = project.getDescription();
- project.open(new SubProgressMonitor(progressMonitor, 1));
- }
-
- return project;
- }
-
- @Override
- protected URI createNewModelURI(String categoryId) {
- IPath newFilePath = myNewProjectPage.getProjectHandle().getFullPath().append(NewModelFilePage.DEFAULT_NAME + "." + getDiagramFileExtension(categoryId)); //$NON-NLS-1$
- return URI.createPlatformResourceURI(newFilePath.toString(), true);
- }
-
- /**
- * Sets the initial project name.
- *
- * @param initialProjectName
- * the new initial project name
- */
- public void setInitialProjectName(String initialProjectName) {
- this.initialProjectName = initialProjectName;
- }
+@Deprecated
+public class NewPapyrusProjectWizard extends org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard {
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewProjectAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewProjectAction.java
index df5d03bf8ac..31f081d7e33 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewProjectAction.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/NewProjectAction.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,43 +7,18 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
-import java.util.Properties;
+package org.eclipse.papyrus.uml.diagram.wizards;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.internal.intro.impl.IntroPlugin;
-import org.eclipse.ui.intro.IIntroSite;
-import org.eclipse.ui.intro.config.IIntroAction;
/**
- * The Class NewProjectAction. It is used on the Welcome Page.
+ *
+ * @Deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.action.NewProjectAction}
+ *
*/
-public class NewProjectAction implements IIntroAction {
-
- /**
- * Run.
- *
- * @param site
- * the site
- * @param params
- * the params
- * @see org.eclipse.ui.intro.config.IIntroAction#run(org.eclipse.ui.intro.IIntroSite, java.util.Properties)
- */
- public void run(IIntroSite site, Properties params) {
- IntroPlugin.getDefault();
- IntroPlugin.closeIntro();
-
- NewPapyrusProjectWizard wizard = new NewPapyrusProjectWizard();
- wizard.init(site.getWorkbenchWindow().getWorkbench(), new StructuredSelection());
- WizardDialog dialog = new WizardDialog(site.getShell(), wizard);
- dialog.create();
- dialog.getShell().setSize(Math.max(500, dialog.getShell().getSize().x), 500);
- dialog.open();
- }
+@Deprecated
+public class NewProjectAction extends org.eclipse.papyrus.uml.diagram.wizards.action.NewProjectAction {
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/WorkspaceNewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/WorkspaceNewModelStorageProvider.java
index aa6b0c26989..e28027d7ebd 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/WorkspaceNewModelStorageProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/WorkspaceNewModelStorageProvider.java
@@ -1,133 +1,23 @@
-/*****************************************************************************
- * 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.diagram.wizards;
-
-import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.adapt;
-
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.papyrus.uml.diagram.wizards.InitModelWizard.NewDiagramForExistingModelPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
-import org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper;
-
-/**
- * This is the WorkspaceNewModelStorageProvider type. Enjoy.
- */
-public class WorkspaceNewModelStorageProvider extends AbstractNewModelStorageProvider {
-
- private CreateModelWizard wizard;
-
- /** New model file page for the file. */
- private NewModelFilePage newModelFilePage;
-
- public WorkspaceNewModelStorageProvider() {
- super();
- }
-
- public boolean canHandle(IStructuredSelection initialSelection) {
- boolean result = false;
-
- for (Object next : initialSelection.toList()) {
- if (adapt(next, IResource.class) != null) {
- result = true;
- break;
- }
- }
-
- return result;
- }
-
- @Override
- public void init(CreateModelWizard wizard, IStructuredSelection selection) {
- super.init(wizard, selection);
-
- this.wizard = wizard;
- newModelFilePage = createNewModelFilePage(selection);
- }
-
- public List<? extends IWizardPage> createPages() {
- if (newModelFilePage == null) {
- return Collections.emptyList();
- }
-
- return Arrays.asList(newModelFilePage);
- }
-
- @Override
- public IStatus validateDiagramCategories(String... newCategories) {
- if (newModelFilePage != null) {
- String firstCategory = newCategories.length > 0 ? newCategories[0] : null;
- if (newCategories.length > 0) {
- // 316943 - [Wizard] Wrong suffix for file name when creating a
- // profile model
- return newModelFilePage.diagramExtensionChanged(wizard.getDiagramFileExtension(firstCategory));
- }
- }
-
- return super.validateDiagramCategories(newCategories);
- }
-
- /**
- * Creates the new model file page, if required.
- *
- * @param selection
- * the selection
- *
- * @return the new model file page, or {@code null} if none
- */
- protected NewModelFilePage createNewModelFilePage(IStructuredSelection selection) {
-
- if (wizard.isCreateProjectWizard() || wizard.isCreateMultipleModelsWizard()) {
-
- return null;
- }
-
- // IFile selectedFile = getSelectedFile(selection);
- URI selectedResourceURI = WizardsHelper.getSelectedResourceURI(selection);
-
- if (isCreateFromExistingDomainModel() && selectedResourceURI != null) {
- return new NewDiagramForExistingModelPage(selection, wizard.getModelKindName(), getDiagramFileName(selectedResourceURI) + "." + wizard.getDiagramFileExtension(null), wizard.getDiagramFileExtension(null)); //$NON-NLS-1$
- }
-
- return new NewModelFilePage(selection, wizard.getModelKindName());
- }
-
- /**
- * Suggests a name of diagram file for the domain model file without
- * extension.
- *
- * @param domainModel
- * the domain model
- * @return the diagram file name
- */
- protected String getDiagramFileName(URI domainModelURI) {
- return URI.decode(domainModelURI.trimFileExtension().lastSegment());
- }
-
- protected boolean isCreateFromExistingDomainModel() {
- return wizard.isInitModelWizard() && ((InitModelWizard) wizard).isCreateFromExistingDomainModel();
- }
-
- public URI createNewModelURI(String categoryId) {
- IFile newFile = newModelFilePage.createFileHandle(); // Don't create an empty file, to avoid Resource load exceptions (Empty files are not valid EMF Resources)
- return (newFile == null) ? null : URI.createPlatformResourceURI(newFile.getFullPath().toString(), true);
- }
-
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards;
+
+/**
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.providers.WorkspaceNewModelStorageProvider}
+ *
+ */
+@Deprecated
+public class WorkspaceNewModelStorageProvider extends org.eclipse.papyrus.uml.diagram.wizards.providers.WorkspaceNewModelStorageProvider {
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/action/NewProjectAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/action/NewProjectAction.java
new file mode 100644
index 00000000000..03e23d1bdae
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/action/NewProjectAction.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards.action;
+
+import java.util.Properties;
+
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard;
+import org.eclipse.ui.IPerspectiveDescriptor;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroManager;
+import org.eclipse.ui.intro.IIntroPart;
+import org.eclipse.ui.intro.IIntroSite;
+import org.eclipse.ui.intro.config.IIntroAction;
+
+/**
+ * The Class NewProjectAction. It is used on the Welcome Page.
+ */
+public class NewProjectAction implements IIntroAction {
+
+ /**
+ * Run.
+ *
+ * @param site
+ * the site
+ * @param params
+ * the params
+ * @see org.eclipse.ui.intro.config.IIntroAction#run(org.eclipse.ui.intro.IIntroSite, java.util.Properties)
+ */
+ public void run(IIntroSite site, Properties params) {
+ final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ IPerspectiveDescriptor activePerspective = workbenchWindow.getActivePage().getPerspective();
+
+ final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
+ IIntroPart part = introManager.getIntro();
+ introManager.closeIntro(part);
+ NewPapyrusProjectWizard wizard = new NewPapyrusProjectWizard();
+ wizard.init(site.getWorkbenchWindow().getWorkbench(), new StructuredSelection());
+ WizardDialog dialog = new WizardDialog(site.getShell(), wizard);
+ dialog.create();
+ dialog.open();
+
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java
index e6fd14a37e1..9a91e05e663 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/DiagramCategoryRegistry.java
@@ -27,7 +27,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.papyrus.infra.core.extension.BadClassNameException;
import org.eclipse.papyrus.infra.core.extension.ExtensionUtils;
import org.eclipse.papyrus.infra.core.extension.commands.IModelCreationCommand;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
@@ -136,10 +136,10 @@ public class DiagramCategoryRegistry extends ExtensionUtils {
* Builds the category descriptor.
*
* @param confElement
- * the conf element
+ * the conf element
* @return the diagram category descriptor
* @throws BadClassNameException
- * the bad class name exception
+ * the bad class name exception
*/
protected DiagramCategoryDescriptor buildCategoryDescriptor(IConfigurationElement confElement) throws BadClassNameException {
Class<IModelCreationCommand> commandClazz = (Class<IModelCreationCommand>) parseClass(confElement, CATEGORY_CLASS, CATEGORY_ELEMENT_NAME);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/NewPapyrusModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/NewPapyrusModelCommand.java
index 9b2a00f49cc..5ce8a77d6f9 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/NewPapyrusModelCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/NewPapyrusModelCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2013 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,44 +7,24 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
+
package org.eclipse.papyrus.uml.diagram.wizards.category;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
/**
- * The Command to create a new Papyrus Model.
+ *
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand}
+ *
*/
-public class NewPapyrusModelCommand extends RecordingCommand {
-
- /** The my model set. */
- private final ModelSet myModelSet;
-
- /** The URI of the model to create. */
- private final URI myURI;
-
- /**
- * Instantiates a new new papyrus model command.
- *
- * @param modelSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- */
+@Deprecated
+public class NewPapyrusModelCommand extends org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand {
+
public NewPapyrusModelCommand(ModelSet modelSet, URI newURI) {
- super(modelSet.getTransactionalEditingDomain());
- myModelSet = modelSet;
- myURI = newURI;
- }
-
- @Override
- protected void doExecute() {
- myModelSet.createModels(myURI);
+ super(modelSet, newURI);
}
-} \ No newline at end of file
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/PapyrusModelFromExistingDomainModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/PapyrusModelFromExistingDomainModelCommand.java
index d47407cf54e..3d530952ef2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/PapyrusModelFromExistingDomainModelCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/category/PapyrusModelFromExistingDomainModelCommand.java
@@ -16,92 +16,18 @@
package org.eclipse.papyrus.uml.diagram.wizards.category;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
/**
- * The command to initialize Papyrus diagram for a given domain model.
+ * @deprecated use {@link org.eclipse.papyrus.uml.diagram.wizards.command.PapyrusModelFromExistingDomainModelCommand}
+ *
*/
-public class PapyrusModelFromExistingDomainModelCommand extends RecordingCommand {
+@Deprecated
+public class PapyrusModelFromExistingDomainModelCommand extends org.eclipse.papyrus.uml.diagram.wizards.command.PapyrusModelFromExistingDomainModelCommand {
- /** The my di resource set. */
- private final ModelSet myDiResourceSet;
-
- /** The new model URI, without extension. */
- private final URI myURIWithoutExtension;
-
- /** The my root. */
- private final EObject myRoot;
-
- /**
- * Instantiates a new papyrus model from existing domain model command.
- *
- * @param diResourceSet
- * the di resource set
- * @param newURI
- * the URI of the new model's principal resource
- * @param root
- * the root
- */
public PapyrusModelFromExistingDomainModelCommand(ModelSet modelSet, URI newURI, EObject root) {
- super(modelSet.getTransactionalEditingDomain());
- myDiResourceSet = modelSet;
- myURIWithoutExtension = newURI.trimFileExtension();
- // Bug 339504 - [Wizard] NPE when init diagram from an existing model
- modelSet.getInternal().setPrimaryModelResourceURI(newURI);
- myRoot = root;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- */
- @Override
- protected void doExecute() {
- IModel model = myDiResourceSet.getModel(SashModel.MODEL_ID);
- model.createModel(myURIWithoutExtension);
- model = myDiResourceSet.getModel(NotationModel.MODEL_ID);
- model.createModel(myURIWithoutExtension);
- // START OF WORKAROUND for #315083
- IModel umlModel = new UmlModel() {
-
- @Override
- public void createModel(URI uri) {
- try {
- resourceURI = myRoot.eResource().getURI();
- // as resource already exists, use rs.getResource() not rs.createResource() here
- try {
- resource = getResourceSet().getResource(resourceURI, true);
- } catch (WrappedException e) {
- if (ModelUtils.isDegradedModeAllowed(e.getCause())) {
- // in this case Papyrus can work in degraded mode
- resource = getResourceSet().getResource(resourceURI, false);
- if (resource == null) {
- throw e;
- }
- } else {
- throw e;
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- };
- };
- myDiResourceSet.getInternal().registerModel(umlModel, true);
- umlModel.createModel((URI) null);
-
- // // call snippets to allow them to do their stuff
- // snippets.performStart(this);
- // END OF WORKAROUND for #315083
+ super(modelSet, newURI, root);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/CopyModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/CopyModelCommand.java
new file mode 100644
index 00000000000..101b7a4d54a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/CopyModelCommand.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards.command;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+
+public class CopyModelCommand extends RecordingCommand {
+
+ private Resource inResource;
+
+ private List<EObject> outObjects;
+
+ public CopyModelCommand(TransactionalEditingDomain domain, Resource inResource, List<EObject> outObjects) {
+ super(domain);
+ this.inResource = inResource;
+ this.outObjects = outObjects;
+ }
+
+ @Override
+ protected void doExecute() {
+ inResource.getContents().addAll(outObjects);
+
+
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/InitFromTemplateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/InitFromTemplateCommand.java
new file mode 100644
index 00000000000..65a4d9d79c7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/InitFromTemplateCommand.java
@@ -0,0 +1,204 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ *
+ * 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Saadia Dhouib (CEA LIST) - Implementation of loading diagrams from template files (.uml, .di , .notation)
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.command;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+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.util.EcoreUtil;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModelUtils;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+
+
+/**
+ * The Class InitFromTemplateCommand.
+ */
+public class InitFromTemplateCommand extends RecordingCommand {
+
+ /** The my model resource. */
+ private final Resource myModelUMLResource;
+
+ /** The my model di resource. */
+ private final Resource myModelDiResource;
+
+ /** The my model notation resource. */
+ private final Resource myModelNotationResource;
+
+ /** The my template path. */
+ private final String myUmlTemplatePath;
+
+ /** The my di template path. */
+ private final String myDiTemplatePath;
+
+ /** The my notation template path. */
+ private final String myNotationTemplatePath;
+
+ /** The my plugin id. */
+ private final String myPluginId;
+
+ /**
+ * Instantiates a new inits the from template command.
+ *
+ * @param editingDomain
+ * the editing domain
+ * @param diResouceSet
+ * the di resouce set
+ * @param pluginId
+ * the plugin id
+ * @param umlTemplatePath
+ * the uml template path
+ * @param notationTemplatePath
+ * the notation template path
+ * @param diTemplatePath
+ * the di template path
+ */
+ public InitFromTemplateCommand(TransactionalEditingDomain editingDomain, ModelSet modelSet, String pluginId, String umlTemplatePath, String notationTemplatePath, String diTemplatePath) {
+ super(editingDomain);
+ myModelUMLResource = UmlUtils.getUmlResource(modelSet);
+ myModelDiResource = DiModelUtils.getDiResource(modelSet);
+ myModelNotationResource = NotationUtils.getNotationResource(modelSet);
+ myPluginId = pluginId;
+ myUmlTemplatePath = umlTemplatePath;
+ myDiTemplatePath = diTemplatePath;
+ myNotationTemplatePath = notationTemplatePath;
+
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ */
+ @Override
+ protected void doExecute() {
+ try {
+ initializeFromTemplate();
+ //verify if .di file and .notation file were filled in the org.eclipse.papyrus.uml.diagram.wizards.templates extension
+
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+
+
+
+ /**
+ * Initialize from template.
+ *
+ *
+ * @throws IOException
+ * Signals that an I/O exception has occurred.
+ */
+ private void initializeFromTemplate() throws IOException {
+ Resource templateDiResource = null;
+ Resource templateNotationResource = null;
+ Resource templateUmlResource = null;
+
+
+ final ResourceSet resourceSet = new ResourceSetImpl();
+
+ try {
+ //0. initalization of the UML object
+ templateUmlResource = loadTemplateResource(myUmlTemplatePath, resourceSet);
+ EcoreUtil.resolveAll(templateUmlResource);
+
+ //1. test if di and notation exist
+ //verify if .di file and .notation file were filled in the org.eclipse.papyrus.uml.diagram.wizards.templates extension
+ if((myDiTemplatePath != null) && (myNotationTemplatePath != null)) {
+ //2.1 verify if the .di , .notation and .uml files have the same name
+ String diFileName = WizardsHelper.getFileNameWithoutExtension(myDiTemplatePath);
+ String umlFileName = WizardsHelper.getFileNameWithoutExtension(myUmlTemplatePath);
+ String notationFileName = WizardsHelper.getFileNameWithoutExtension(myNotationTemplatePath);
+
+ if(diFileName.contentEquals(umlFileName) && diFileName.contentEquals(notationFileName)) {
+
+ //1.2 load di resource
+ if(myDiTemplatePath != null) {
+ templateDiResource = loadTemplateResource(myDiTemplatePath, resourceSet);
+ EcoreUtil.resolveAll(templateDiResource);
+ }
+
+ //1.3 load notation resource
+ if(myNotationTemplatePath != null) {
+ templateNotationResource = loadTemplateResource(myNotationTemplatePath, resourceSet);
+ EcoreUtil.resolveAll(templateNotationResource);
+ }
+
+ }
+ }
+
+ //2. copy all elements
+ EcoreUtil.Copier copier = new EcoreUtil.Copier();
+ Collection<EObject> umlObjects = copier.copyAll(templateUmlResource.getContents());
+ Collection<EObject> diObjects = (templateDiResource == null) ? null : copier.copyAll(templateDiResource.getContents());
+ Collection<EObject> notationObjects = (templateNotationResource == null) ? null : copier.copyAll(templateNotationResource.getContents());
+ copier.copyReferences();
+
+
+ //3. set copied elements in goods resources
+ myModelUMLResource.getContents().addAll(umlObjects);
+ if(diObjects != null) {
+ myModelDiResource.getContents().addAll(diObjects);
+ }
+ if(notationObjects != null) {
+ myModelNotationResource.getContents().addAll(notationObjects);
+ }
+ } finally {
+ EMFHelper.unload(resourceSet);
+ }
+ }
+
+
+
+ /**
+ * Load template resource.
+ *
+ * @param path
+ * the path
+ * @return the resource
+ */
+ private Resource loadTemplateResource(String path, ResourceSet resourceSet) {
+ java.net.URL templateURL = Platform.getBundle(myPluginId).getResource(path);
+ if(templateURL != null) {
+ String fullUri = templateURL.getPath();
+ URI uri = URI.createPlatformPluginURI(myPluginId + fullUri, true);
+ Resource resource = resourceSet.getResource(uri, true);
+ if(resource.isLoaded()) {
+ return resource;
+ }
+ }
+ return null;
+ }
+
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java
new file mode 100644
index 00000000000..98b4ad0a95a
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/NewPapyrusModelCommand.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.command;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+/**
+ * The Command to create a new Papyrus Model.
+ */
+public class NewPapyrusModelCommand extends RecordingCommand {
+
+ /** The my model set. */
+ private final ModelSet myModelSet;
+
+ /** The URI of the model to create. */
+ private final URI myURI;
+
+ /**
+ * Instantiates a new new papyrus model command.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ */
+ public NewPapyrusModelCommand(ModelSet modelSet, URI newURI) {
+ super(modelSet.getTransactionalEditingDomain());
+ myModelSet = modelSet;
+ myURI = newURI;
+ }
+
+ @Override
+ protected void doExecute() {
+ myModelSet.createModels(myURI);
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/PapyrusModelFromExistingDomainModelCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/PapyrusModelFromExistingDomainModelCommand.java
new file mode 100644
index 00000000000..2c6d2fb29af
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/command/PapyrusModelFromExistingDomainModelCommand.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - create model by URI, not IFile (CDO)
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.command;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelUtils;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+
+/**
+ * The command to initialize Papyrus diagram for a given domain model.
+ */
+public class PapyrusModelFromExistingDomainModelCommand extends RecordingCommand {
+
+ /** The my di resource set. */
+ private final ModelSet myDiResourceSet;
+
+ /** The new model URI, without extension. */
+ private final URI myURIWithoutExtension;
+
+ /** The my root. */
+ private final EObject myRoot;
+
+ /**
+ * Instantiates a new papyrus model from existing domain model command.
+ *
+ * @param diResourceSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ * @param root
+ * the root
+ */
+ public PapyrusModelFromExistingDomainModelCommand(ModelSet modelSet, URI newURI, EObject root) {
+ super(modelSet.getTransactionalEditingDomain());
+ myDiResourceSet = modelSet;
+ myURIWithoutExtension = newURI.trimFileExtension();
+ // Bug 339504 - [Wizard] NPE when init diagram from an existing model
+ modelSet.getInternal().setPrimaryModelResourceURI(myURIWithoutExtension);
+ myRoot = root;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
+ */
+ @Override
+ protected void doExecute() {
+ IModel model = myDiResourceSet.getModel(SashModel.MODEL_ID);
+ model.createModel(myURIWithoutExtension);
+ model = myDiResourceSet.getModel(DiModel.DI_MODEL_ID);
+ model.createModel(myURIWithoutExtension);
+ model = myDiResourceSet.getModel(NotationModel.MODEL_ID);
+ model.createModel(myURIWithoutExtension);
+ // START OF WORKAROUND for #315083
+ IModel umlModel = new UmlModel() {
+
+ @Override
+ public void createModel(URI uri) {
+ try {
+ resourceURI = myRoot.eResource().getURI();
+ // as resource already exists, use rs.getResource() not rs.createResource() here
+ try {
+ resource = getResourceSet().getResource(resourceURI, true);
+ } catch (WrappedException e) {
+ if(ModelUtils.isDegradedModeAllowed(e.getCause())) {
+ // in this case Papyrus can work in degraded mode
+ resource = getResourceSet().getResource(resourceURI, false);
+ if(resource == null) {
+ throw e;
+ }
+ } else {
+ throw e;
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ };
+ };
+ myDiResourceSet.getInternal().registerModel(umlModel, true);
+ umlModel.createModel((URI)null);
+ // // call snippets to allow them to do their stuff
+ // snippets.performStart(this);
+ // END OF WORKAROUND for #315083
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindComposite.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindComposite.java
new file mode 100644
index 00000000000..4fccd69f48d
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindComposite.java
@@ -0,0 +1,344 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.kind;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+//import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.CheckboxCellEditor;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.EditingSupport;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+
+public class DiagramKindComposite extends Composite {
+
+ private static final Image CHECKED = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage("org.eclipse.papyrus.uml.diagram.wizards", "icons/checked.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private static final Image UNCHECKED = org.eclipse.papyrus.infra.widgets.Activator.getDefault().getImage("org.eclipse.papyrus.uml.diagram.wizards", "icons/unchecked.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private Map<ViewPrototype, String> diagramNames = new HashMap<ViewPrototype, String>();
+
+ List<String> listNames = new ArrayList<String>();
+
+
+ private Map<ViewPrototype, Integer> selectedDiagrams = new HashMap<ViewPrototype, Integer>();
+
+ public TableViewer viewer;
+
+
+
+
+ public DiagramKindComposite(Composite parent) {
+ super(parent, SWT.NONE);
+ this.setLayout(new GridLayout());
+ this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ createTableViewer(this);
+ }
+
+ public void createTableViewer(final Composite container) {
+
+ viewer = new TableViewer(container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
+ GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
+ gridData.minimumHeight = viewer.getTable().getItemHeight() * 3;
+ viewer.getTable().setLayoutData(gridData);
+
+ // viewer.setContentProvider(new ArrayContentProvider());
+ final Table table = viewer.getTable();
+ viewer.setContentProvider(new DiagramKindContentProvider());
+ table.setHeaderVisible(true);
+
+ // The check column
+ TableViewerColumn colCheckbox = createTableViewerColumn("", 20, viewer); //$NON-NLS-1$
+ colCheckbox.setLabelProvider(new ColumnLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ return ""; //$NON-NLS-1$
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (selectedDiagrams.containsKey(element)) {
+ return CHECKED;
+ } else {
+ return UNCHECKED;
+ }
+ }
+
+ });
+ colCheckbox.setEditingSupport(new EditingSupport(viewer) {
+
+ private CheckboxCellEditor checkboxCellEditor;
+
+ @Override
+ protected void setValue(Object element, Object value) {
+ if (checkboxCellEditor.getValue() == Boolean.TRUE) {
+ selectedDiagrams.put((ViewPrototype) element, 1);
+ } else {
+ selectedDiagrams.remove(element);
+ }
+ viewer.update(element, null);
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ return selectedDiagrams.containsKey(element);
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ checkboxCellEditor = new CheckboxCellEditor(container, SWT.CHECK | SWT.READ_ONLY);
+ return checkboxCellEditor;
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+ });
+ // no need to enable the resize on the check box column
+ colCheckbox.getColumn().setResizable(false);
+
+
+ // The Diagram name column
+ TableViewerColumn colDiagramKind = createTableViewerColumn(Messages.DiagramKindComposite_0, 200, viewer);
+ colDiagramKind.setLabelProvider(new ColumnLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ViewPrototype) {
+ return ((ViewPrototype) element).getLabel();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof ViewPrototype) {
+ return ((ViewPrototype) element).getIcon();
+ }
+ return null;
+ }
+
+
+ });
+
+
+ // the name of the diagram the user can edit it to set his onw name
+ TableViewerColumn colDiagramName = createTableViewerColumn(Messages.DiagramKindComposite_2, 300, viewer);
+ colDiagramName.setEditingSupport(new EditingSupport(viewer) {
+
+ @Override
+ protected void setValue(Object element, Object value) {
+
+ diagramNames.put((ViewPrototype) element, (String) value);
+ viewer.update(element, null);
+
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+
+ if (diagramNames.containsKey(element)) {
+ return diagramNames.get(element);
+ }
+ return ""; //$NON-NLS-1$
+
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ return new TextCellEditor(viewer.getTable());
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+ });
+ colDiagramName.setLabelProvider(new ColumnLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+
+ return diagramNames.get(element);
+ }
+ });
+
+
+ // the quantity of the diagram the user would like to create
+ TableViewerColumn colDiagramQuantity = createTableViewerColumn(Messages.DiagramKindComposite_3, 70, viewer);
+ colDiagramQuantity.setEditingSupport(new EditingSupport(viewer) {
+
+ @Override
+ protected void setValue(Object element, Object value) {
+ selectedDiagrams.put((ViewPrototype) element, Integer.parseInt((String) value));
+ viewer.update(element, null);
+ }
+
+ @Override
+ protected Object getValue(Object element) {
+ if (selectedDiagrams.containsKey(element)) {
+ return selectedDiagrams.get(element).toString();
+ }
+ return "0"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected CellEditor getCellEditor(Object element) {
+ TextCellEditor textCellEditor = new TextCellEditor(viewer.getTable());
+ textCellEditor.setValidator(new ICellEditorValidator() {
+
+ @Override
+ public String isValid(Object value) {
+ if (!(value instanceof Integer)) {
+ return null;
+ }
+ return value.toString();
+ }
+ });
+ return textCellEditor;
+ }
+
+ @Override
+ protected boolean canEdit(Object element) {
+ return true;
+ }
+ });
+ colDiagramQuantity.setLabelProvider(new ColumnLabelProvider() {
+
+ @Override
+ public String getText(Object element) {
+ if (selectedDiagrams.containsKey(element)) {
+ return selectedDiagrams.get(element).toString();
+ }
+ // return "0"; //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
+ }
+ });
+
+
+ // TODO - The description of the diagram not yet implemented, should be implemented will generating the diagram
+ // TableViewerColumn colDiagramDescription = createTableViewerColumn("Description", 400, viewer);
+ // colDiagramDescription.setLabelProvider(new ColumnLabelProvider() {
+ //
+ // @Override
+ // public String getText(Object element) {
+ // return null;
+ // }
+ //
+ // });
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ // if(selectedConfigs.size() > 0) {
+ // setPageComplete(true);
+ // } else {
+ // setPageComplete(false);
+ // }
+ }
+ });
+
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param title
+ * @param bound
+ * @param viewer
+ * @return
+ */
+ private TableViewerColumn createTableViewerColumn(String title, int bound, TableViewer viewer) {
+ final TableViewerColumn viewerColumn = new TableViewerColumn(viewer, SWT.NONE);
+ final TableColumn column = viewerColumn.getColumn();
+ column.setText(title);
+ column.setWidth(bound);
+ column.setResizable(true);
+ column.setMoveable(false);
+ return viewerColumn;
+ }
+
+
+ /**
+ * Creates the diagram kind label provider.
+ *
+ * @return the i base label provider
+ */
+ protected IBaseLabelProvider createDiagramKindLabelProvider() {
+ return new DiagramKindLabelProvider();
+ }
+
+
+ public void setInput(Object input) {
+ viewer.setInput(input);
+ }
+
+ public ArrayList<ViewPrototype> getCheckElement() {
+ ArrayList<ViewPrototype> list = new ArrayList<ViewPrototype>();
+ Set<Entry<ViewPrototype, Integer>> set = selectedDiagrams.entrySet();
+ Iterator<Entry<ViewPrototype, Integer>> ite = set.iterator();
+ while (ite.hasNext()) {
+ Entry<ViewPrototype, Integer> me = ite.next();
+ int nb = me.getValue();
+ String tempname = diagramNames.get(me.getKey());
+ // If the name field was not filled
+ if (tempname == null || tempname.equalsIgnoreCase("")) {
+ tempname = me.getKey().getLabel();
+ }
+
+ for (int i = 0; i < nb; i++) {
+ list.add(me.getKey());
+ if (nb > 1) {
+ listNames.add(tempname + "_" + i); //$NON-NLS-1$
+ } else {
+ listNames.add(tempname);
+ }
+ }
+ }
+ return list;
+ }
+
+
+ /**
+ * @return
+ */
+ public List<String> getDiagramName() {
+ return listNames;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java
index 26cf8cb9cd8..846c6118aad 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/kind/DiagramKindLabelProvider.java
@@ -16,7 +16,7 @@ package org.eclipse.papyrus.uml.diagram.wizards.kind;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.swt.graphics.Image;
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/Messages.java
new file mode 100644
index 00000000000..3287c65c017
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/Messages.java
@@ -0,0 +1,172 @@
+package org.eclipse.papyrus.uml.diagram.wizards.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The Class Messages.
+ */
+public class Messages extends NLS {
+
+ /** The Constant BUNDLE_NAME. */
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.diagram.wizards.messages.messages"; //$NON-NLS-1$
+
+ /** The Create model wizard_new_papyrus_model_title. */
+ public static String CreateModelWizard_new_papyrus_model_title;
+
+ /** The Create several models wizard_cannot_initiate_page. */
+ public static String CreateSeveralModelsWizard_cannot_initiate_page;
+
+ /** The Create several models wizard_new_model_file_page_title. */
+ public static String CreateSeveralModelsWizard_new_model_file_page_title;
+
+ /** The Init model wizard_diagram_name_is_different_from_domain_model. */
+ public static String InitModelWizard_diagram_name_is_different_from_domain_model;
+
+ /** The Init model wizard_init_papyrus_diagram. */
+ public static String InitModelWizard_init_papyrus_diagram;
+
+ /** The Init model wizard_init_papyrus_model. */
+ public static String InitModelWizard_init_papyrus_model;
+
+ /** The Init model wizard_init_papyrus_model_desc. */
+ public static String InitModelWizard_init_papyrus_model_desc;
+
+ /** The New papyrus project with multi models wizard_exception_on_project_opening. */
+ public static String NewPapyrusProjectWithMultiModelsWizard_exception_on_project_opening;
+
+ public static String NewPapyrusProjectWizard_0;
+
+ public static String NewPapyrusProjectWizard_1;
+
+ /** The New papyrus project wizard_exception_on_opening. */
+ public static String NewPapyrusProjectWizard_exception_on_opening;
+
+ /** The New papyrus project wizard_new_papyrus_project. */
+ public static String NewPapyrusProjectWizard_new_papyrus_project;
+
+ /** The New papyrus project wizard_papyrus_project. */
+ public static String NewPapyrusProjectWizard_papyrus_project;
+
+ /** The New papyrus project wizard_papyrus_project_desc. */
+ public static String NewPapyrusProjectWizard_papyrus_project_desc;
+
+ /** The Diagram category registry_bad_class_name_of_category. */
+ public static String DiagramCategoryRegistry_bad_class_name_of_category;
+
+ public static String DiagramKindComposite_0;
+
+ public static String DiagramKindComposite_2;
+
+ public static String DiagramKindComposite_3;
+
+ /** The Diagram kind label provider_undefined_element. */
+ public static String DiagramKindLabelProvider_undefined_element;
+
+ public static String FileChooser_0;
+
+ /** The Model templates label provider_model_template_description_text. */
+ public static String ModelTemplatesLabelProvider_model_template_description_text;
+
+ /** The New model file page_3. */
+ public static String NewModelFilePage_3;
+
+ /** The New model file page_default_diagram_name. */
+ public static String NewModelFilePage_default_diagram_name;
+
+ /** The New model file page_diagram_file_was_renamed. */
+ public static String NewModelFilePage_diagram_file_was_renamed;
+
+ /** The New model file page_new_diagram_category_needs_specific_extension. */
+ public static String NewModelFilePage_new_diagram_category_needs_specific_extension;
+
+ /** The New model file page_page_desc. */
+ public static String NewModelFilePage_page_desc;
+
+ /** The Select diagram category page_cannot_find_category. */
+ public static String SelectDiagramCategoryPage_cannot_find_category;
+
+ /** The Select diagram category page_diagram_language_group. */
+ public static String SelectDiagramCategoryPage_diagram_language_group;
+
+ /** The Select diagram category page_select_language. */
+ public static String SelectDiagramCategoryPage_select_language;
+
+ /** The Select diagram category page_select_one_category. */
+ public static String SelectDiagramCategoryPage_select_one_category;
+
+ public static String SelectDiagramKindPage_0;
+
+ /** The Select diagram kind page_default_diagram_name. */
+ public static String SelectDiagramKindPage_default_diagram_name;
+
+ /** The Select diagram kind page_diagram_name_group. */
+ public static String SelectDiagramKindPage_diagram_name_group;
+
+ /** The Select diagram kind page_diagram_name_is_empty. */
+ public static String SelectDiagramKindPage_diagram_name_is_empty;
+
+ /** The Select diagram kind page_load_template_group. */
+ public static String SelectDiagramKindPage_load_template_group;
+
+ /** The Select diagram kind page_page_desc. */
+ public static String SelectDiagramKindPage_page_desc;
+
+ /** The Select diagram kind page_page_title. */
+ public static String SelectDiagramKindPage_page_title;
+
+ /** The Select diagram kind page_remember_current_selection_text. */
+ public static String SelectDiagramKindPage_remember_current_selection_text;
+
+ /** The Select diagram kind page_remember_current_selection_tooltip. */
+ public static String SelectDiagramKindPage_remember_current_selection_tooltip;
+
+ /** The Select diagram kind page_select_kind_group. */
+ public static String SelectDiagramKindPage_select_kind_group;
+
+ /** The Select root element page_select_root_element_desc. */
+ public static String SelectRootElementPage_select_root_element_desc;
+
+ /** The Select root element page_select_root_element_title. */
+ public static String SelectRootElementPage_select_root_element_title;
+
+ public static String SelectStorageProviderPage_0;
+
+ public static String SelectStorageProviderPage_1;
+
+ public static String SelectStorageProviderPage_2;
+
+ public static String SelectStorageProviderPage_3;
+
+ public static String ModelCopyWizard_AlreadyyExists;
+
+ public static String ModelCopyWizard_CannotCreateCopy;
+
+ public static String ModelCopyWizard_CannotOpenFIle;
+
+ public static String ModelCopyWizard_ChooseOtherParentFolder;
+
+ public static String ModelCopyWizard_CopyModel;
+
+ public static String ModelCopyWizard_CreatePapyrusExample;
+
+ public static String ModelCopyWizard_DoNotChangeFileName;
+
+ public static String ModelCopyWizard_SelectParentFolder;
+
+ public static String PapyrusProjectCreationPage_0;
+
+ public static String PapyrusProjectCreationPage_1;
+
+ public static String PapyrusProjectCreationPage_3;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Instantiates a new messages.
+ */
+ protected Messages() {
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/messages.properties
index 76c5b04a24e..2fc2be3d5a0 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/messages.properties
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/messages/messages.properties
@@ -19,6 +19,8 @@ InitModelWizard_init_papyrus_diagram=Init Papyrus Diagram
InitModelWizard_init_papyrus_model=Init a new Papyrus model
InitModelWizard_init_papyrus_model_desc=Init a new Papyrus model from the existing domain model
NewPapyrusProjectWithMultiModelsWizard_exception_on_project_opening=Problems during opening of the project
+NewPapyrusProjectWizard_0=PapyrusNewProjectPage
+NewPapyrusProjectWizard_1=Choose your project path and the model name
NewPapyrusProjectWizard_exception_on_opening=Problems during opening of the project
NewPapyrusProjectWizard_new_papyrus_project=New Papyrus Project
NewPapyrusProjectWizard_papyrus_project=Papyrus Project
@@ -26,7 +28,11 @@ NewPapyrusProjectWizard_papyrus_project_desc=Create a New Papyrus Project
DiagramCategoryRegistry_bad_class_name_of_category=Could not find implementation for a diagram category
+DiagramKindComposite_0=Diagram name
+DiagramKindComposite_2=Name
+DiagramKindComposite_3=Quantity
DiagramKindLabelProvider_undefined_element=<undefined>
+FileChooser_0=Browse workspace
ModelTemplatesLabelProvider_model_template_description_text={0} ({1})
@@ -39,17 +45,22 @@ SelectDiagramCategoryPage_cannot_find_category=Could not find DiagramCategory fo
SelectDiagramCategoryPage_diagram_language_group=Diagram Language:
SelectDiagramCategoryPage_select_language=Select language of the diagram
SelectDiagramCategoryPage_select_one_category=Please select at least one category
-SelectDiagramKindPage_default_diagram_name=NewDiagram
-SelectDiagramKindPage_diagram_name_group=Diagram Name:
+SelectDiagramKindPage_0=Choose a profile to apply
+SelectDiagramKindPage_default_diagram_name=RootElement
+SelectDiagramKindPage_diagram_name_group=Root model element name :
SelectDiagramKindPage_diagram_name_is_empty=The diagram name should not be empty.
SelectDiagramKindPage_load_template_group=You can load a template:
-SelectDiagramKindPage_page_desc=Select name and kind of the diagram
+SelectDiagramKindPage_page_desc=Select root element name and diagram kind
SelectDiagramKindPage_page_title=Initialization information
SelectDiagramKindPage_remember_current_selection_text=Remember current selection
SelectDiagramKindPage_remember_current_selection_tooltip=The current selection will be used when you open the wizard next time
SelectDiagramKindPage_select_kind_group=Select a Diagram Kind:
SelectRootElementPage_select_root_element_desc=Select the root element
SelectRootElementPage_select_root_element_title=Select the root element
+SelectStorageProviderPage_0=Model Storage
+SelectStorageProviderPage_1=Select the kind of storage for the new model.
+SelectStorageProviderPage_2=Where would you like to store the new model?
+SelectStorageProviderPage_3=Uncaught exception in selection listener.
ModelCopyWizard_AlreadyyExists=already exists.
ModelCopyWizard_CannotCreateCopy=Cannot create copy
@@ -59,3 +70,6 @@ ModelCopyWizard_CopyModel=Copy model
ModelCopyWizard_CreatePapyrusExample=Create Papyrus example
ModelCopyWizard_DoNotChangeFileName=Do not change file name (will be ignored)
ModelCopyWizard_SelectParentFolder=Select parent folder for example "%s"
+PapyrusProjectCreationPage_0=Model file name :
+PapyrusProjectCreationPage_1=model
+PapyrusProjectCreationPage_3=Set model file name
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewDiagramForExistingModelPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewDiagramForExistingModelPage.java
new file mode 100644
index 00000000000..09fda2044f0
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewDiagramForExistingModelPage.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.pages;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+
+
+/**
+ * @author Thibault
+ *
+ */
+public class NewDiagramForExistingModelPage extends NewModelFilePage {
+
+ /** The my diagram file name. */
+ private String myDiagramFileName;
+
+ /**
+ * Instantiates a new new diagram for existing model page.
+ *
+ * @param selection
+ * the selection
+ * @param defaultFileName
+ * the default file name
+ * @param modelKindName
+ * the user-presentable (translatable) name of the kind of
+ * model to create
+ * @param diagramExtension
+ * the diagram extension
+ */
+ public NewDiagramForExistingModelPage(IStructuredSelection selection, String modelKindName, String defaultFileName, String diagramExtension) {
+
+ super(selection, modelKindName);
+
+ myDiagramFileName = defaultFileName;
+ if(myDiagramFileName.contains("%20")) {
+ myDiagramFileName = myDiagramFileName.replaceAll("%20", " ");
+ }
+ setFileName(myDiagramFileName);
+ setFileExtension(diagramExtension);
+ setTitle(Messages.InitModelWizard_init_papyrus_model);
+ setDescription(Messages.InitModelWizard_init_papyrus_model_desc);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#validatePage()
+ */
+ @Override
+ protected boolean validatePage() {
+ if(!super.validatePage()) {
+ return false;
+ }
+ if(!myDiagramFileName.equals(getFileName())) {
+ setErrorMessage(Messages.bind(Messages.InitModelWizard_diagram_name_is_different_from_domain_model, myDiagramFileName));
+ return false;
+ }
+ return true;
+ };
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java
index 6c7b6f2c191..221bbf350fc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/NewModelFilePage.java
@@ -21,9 +21,9 @@ import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.wizards.Activator;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
/**
@@ -80,8 +80,14 @@ public class NewModelFilePage extends WizardNewFileCreationPage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
- setFileName(getUniqueFileName(getContainerFullPath(), getFileName(), getFileExtension()));
+ String filename = getFileName();
+ if(filename.contains("%20")) {
+ filename = filename.replaceAll("%20", " ");
+ }
+ setFileName(getUniqueFileName(getContainerFullPath(), filename, getFileExtension()));
setPageComplete(validatePage());
+
+
}
/**
@@ -95,26 +101,27 @@ public class NewModelFilePage extends WizardNewFileCreationPage {
String currentExtension = getFileExtension();
if (!currentExtension.equals(newExtension)) {
- String oldFileName = getFileName();
- String newFileName = NewModelFilePage.getUniqueFileName(getContainerFullPath(), getFileName(), newExtension);
+ // String oldFileName = getFileName();
+ String newFileName = NewModelFilePage.getUniqueFileName(getContainerFullPath(), getFileName().replace(currentExtension, ""), newExtension);
setFileName(newFileName);
setFileExtension(newExtension);
- String message1 = Messages.NewModelFilePage_new_diagram_category_needs_specific_extension;
- String message2 = NLS.bind(Messages.NewModelFilePage_diagram_file_was_renamed, oldFileName, newFileName);
- String message = message1 + message2;
- Status resultStatus = new Status(IStatus.INFO, Activator.PLUGIN_ID, message);
-
- String errorMessage = getErrorMessage();
- if (errorMessage != null) {
- resultStatus = new Status(IStatus.ERROR, Activator.PLUGIN_ID, errorMessage);
- }
- return resultStatus;
+ // String message1 = Messages.NewModelFilePage_new_diagram_category_needs_specific_extension;
+ // String message2 = Messages.bind(Messages.NewModelFilePage_diagram_file_was_renamed, oldFileName, newFileName);
+ // String message = message1 + message2;
+ // Status resultStatus = new Status(Status.INFO, Activator.PLUGIN_ID, message);
+ //
+ // String errorMessage = getErrorMessage();
+ // if(errorMessage != null) {
+ // resultStatus = new Status(Status.ERROR, Activator.PLUGIN_ID, errorMessage);
+ // }
+ // return resultStatus;
}
return Status.OK_STATUS;
}
+ @Deprecated
public IFile createFileHandle() {
IPath containerFullPath = getContainerFullPath();
String fileName = getFileName();
@@ -145,8 +152,8 @@ public class NewModelFilePage extends WizardNewFileCreationPage {
fileName = DEFAULT_NAME;
}
- if (fileName.contains(".")) { //$NON-NLS-1$
- fileName = fileName.substring(0, fileName.indexOf(".")); //$NON-NLS-1$
+ if(fileName.contains(".")) { //$NON-NLS-1$
+ fileName = fileName.substring(0, fileName.lastIndexOf(".")); //$NON-NLS-1$
}
IPath filePath = containerFullPath.append(fileName);
@@ -180,4 +187,10 @@ public class NewModelFilePage extends WizardNewFileCreationPage {
// Disable this method to avoid NPE (Because we override #createAdvancedControls)
}
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp("org.eclipse.papyrus.uml.diagram.wizards.FileChooser"); //$NON-NLS-1$
+
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/PapyrusProjectCreationPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/PapyrusProjectCreationPage.java
new file mode 100644
index 00000000000..60747ed11e3
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/PapyrusProjectCreationPage.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards.pages;
+
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+
+public class PapyrusProjectCreationPage extends WizardNewProjectCreationPage {
+
+ private Text fileName;
+
+ private Listener fileNameModifyListener = new Listener() {
+
+ public void handleEvent(Event e) {
+ boolean valid = canFlipToNextPage();
+ setPageComplete(valid);
+
+ }
+ };
+
+ public PapyrusProjectCreationPage(String pageName) {
+ super(pageName);
+ }
+
+
+
+ @Override
+ public void createControl(Composite parent) {
+ super.createControl(parent);
+ Composite composite = (Composite)getControl();
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.DOWN, true, false));
+ GridLayout gridLayout = new GridLayout(1, false);
+ composite.setLayout(gridLayout);
+ setControl(composite);
+ Group group = createGroup(composite, Messages.PapyrusProjectCreationPage_0);
+ fileName = new Text(group, SWT.BORDER);
+ fileName.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ fileName.setText(Messages.PapyrusProjectCreationPage_1);
+ fileName.addListener(SWT.Modify, fileNameModifyListener);
+ setPageComplete(false);
+ }
+
+ /**
+ * Creates the group.
+ *
+ * @param parent
+ * the parent
+ * @param name
+ * the name
+ * @return the group
+ */
+ private static Group createGroup(Composite parent, String name) {
+ Group group = new Group(parent, SWT.NONE);
+ group.setText(name);
+ GridLayout layout = new GridLayout(1, true);
+ layout.marginHeight = 5;
+ layout.marginWidth = 5;
+ group.setLayout(layout);
+ GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ group.setLayoutData(data);
+ return group;
+ }
+
+ @Override
+ protected boolean validatePage() {
+ if(fileName != null) {
+ if(fileName.getText().equals("")) { //$NON-NLS-1$
+ this.setErrorMessage(Messages.PapyrusProjectCreationPage_3);
+ return false;
+ }
+ }
+
+ return super.validatePage();
+ }
+
+ public String getFileName() {
+ return fileName.getText();
+ }
+
+ @Override
+ public boolean canFlipToNextPage() {
+ if(validatePage() && !fileName.getText().equals("")) { //$NON-NLS-1$
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp("org.eclipse.papyrus.uml.diagram.wizards.NewProject"); //$NON-NLS-1$
+
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java
index f44656f6fc2..58a3c95025f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramCategoryPage.java
@@ -20,16 +20,16 @@ import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
-import org.eclipse.papyrus.uml.diagram.wizards.SettingsHelper;
import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryDescriptor;
import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.utils.SettingsHelper;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
@@ -39,6 +39,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
+import org.eclipse.ui.PlatformUI;
/**
@@ -73,7 +74,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Instantiates a new select diagram category page.
*
* @param allowSeveralCategories
- * the allow several categories
+ * the allow several categories
*/
public SelectDiagramCategoryPage(boolean allowSeveralCategories) {
super(PAGE_ID);
@@ -85,7 +86,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Sets the wizard.
*
* @param newWizard
- * the new wizard
+ * the new wizard
* @see org.eclipse.jface.wizard.WizardPage#setWizard(org.eclipse.jface.wizard.IWizard)
*/
@Override
@@ -93,11 +94,11 @@ public class SelectDiagramCategoryPage extends WizardPage {
super.setWizard(newWizard);
SettingsHelper settingsHelper = new SettingsHelper(getDialogSettings());
String[] defaultDiagramCategory = settingsHelper.getDefaultDiagramCategories();
- if (defaultDiagramCategory != null && defaultDiagramCategory.length > 0) {
- if (myAllowSeveralCategories) {
+ if(defaultDiagramCategory != null && defaultDiagramCategory.length > 0) {
+ if(myAllowSeveralCategories) {
setDefaultDiagramCategories(defaultDiagramCategory);
} else {
- setDefaultDiagramCategories(new String[] { defaultDiagramCategory[0] });
+ setDefaultDiagramCategories(new String[]{ defaultDiagramCategory[0] });
}
}
}
@@ -106,7 +107,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Creates the control.
*
* @param parent
- * the parent
+ * the parent
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
@@ -116,9 +117,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
gridLayout.marginWidth = 10;
plate.setLayout(gridLayout);
setControl(plate);
-
createDiagramCategoryForm(plate);
-
setPageComplete(validatePage());
}
@@ -130,20 +129,6 @@ public class SelectDiagramCategoryPage extends WizardPage {
setPageComplete(validatePage());
}
- /**
- *
- * Gets the diagram category.
- *
- * @return the diagram category
- * @deprecated Use getDiagramCategories() instead.
- */
- @Deprecated
- public String getDiagramCategory() {
- if (!mySelectedDiagramCategoryIds.isEmpty()) {
- return mySelectedDiagramCategoryIds.get(0);
- }
- return null;
- }
/**
* Gets the diagram categories.
@@ -158,7 +143,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Sets the default diagram categories.
*
* @param categories
- * the new default diagram categories
+ * the new default diagram categories
*/
protected final void setDefaultDiagramCategories(String[] categories) {
mySelectedDiagramCategoryIds.clear();
@@ -194,16 +179,16 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Validate file extension.
*
* @param categories
- * the categories
+ * the categories
* @return true, if successful
*/
protected boolean validateFileExtension(String... categories) {
- IStatus status = ((CreateModelWizard) getWizard()).diagramCategoryChanged(categories);
- switch (status.getSeverity()) {
- case IStatus.ERROR:
- setErrorMessage(status.getMessage());
- return false;
- case IStatus.WARNING:
+ IStatus status = ((CreateModelWizard)getWizard()).diagramCategoryChanged(categories);
+ switch(status.getSeverity()) {
+ // case Status.ERROR:
+ // setErrorMessage(status.getMessage());
+ // return false;
+ case Status.WARNING:
setMessage(status.getMessage(), IMessageProvider.WARNING);
break;
case IStatus.INFO:
@@ -217,13 +202,13 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Validate category exists.
*
* @param newCategory
- * the new category
+ * the new category
* @return true, if successful
*/
protected boolean validateCategoryExists(String newCategory) {
DiagramCategoryDescriptor selected = getDiagramCategoryMap().get(newCategory);
- if (selected == null) {
- setErrorMessage(NLS.bind(Messages.SelectDiagramCategoryPage_cannot_find_category, newCategory));
+ if(selected == null) {
+ setErrorMessage(Messages.bind(Messages.SelectDiagramCategoryPage_cannot_find_category, newCategory));
return false;
}
return true;
@@ -277,13 +262,13 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Diagram category selected.
*
* @param category
- * the category
+ * the category
* @param checked
- * the checked
+ * the checked
*/
protected void diagramCategorySelected(String category, boolean checked) {
- if (checked) {
- if (!mySelectedDiagramCategoryIds.contains(category)) {
+ if(checked) {
+ if(!mySelectedDiagramCategoryIds.contains(category)) {
mySelectedDiagramCategoryIds.add(category);
}
} else {
@@ -302,7 +287,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Check buttons for.
*
* @param diagramCategories
- * the diagram categories
+ * the diagram categories
*/
protected void checkButtonsFor(String... diagramCategories) {
for (Button button : myDiagramKindButtons) {
@@ -321,9 +306,9 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Creates the category button.
*
* @param diagramCategoryDescriptor
- * the diagram category descriptor
+ * the diagram category descriptor
* @param group
- * the group
+ * the group
* @return the button
*/
private Button createCategoryButton(DiagramCategoryDescriptor diagramCategoryDescriptor, Group group) {
@@ -342,7 +327,7 @@ public class SelectDiagramCategoryPage extends WizardPage {
* Gets the image.
*
* @param imageDescriptor
- * the image descriptor
+ * the image descriptor
* @return the image
*/
private static Image getImage(ImageDescriptor imageDescriptor) {
@@ -373,5 +358,11 @@ public class SelectDiagramCategoryPage extends WizardPage {
return group;
}
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp("org.eclipse.papyrus.uml.diagram.wizards.Category"); //$NON-NLS-1$
+
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java
index f717b281c3d..afc635ab9d4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectDiagramKindPage.java
@@ -13,39 +13,29 @@
package org.eclipse.papyrus.uml.diagram.wizards.pages;
import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
-import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.papyrus.commands.CreationCommandDescriptor;
import org.eclipse.papyrus.commands.CreationCommandRegistry;
import org.eclipse.papyrus.commands.ICreationCommandRegistry;
import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
-import org.eclipse.papyrus.uml.diagram.wizards.SettingsHelper;
-import org.eclipse.papyrus.uml.diagram.wizards.kind.DiagramKindContentProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.kind.DiagramKindComposite;
import org.eclipse.papyrus.uml.diagram.wizards.kind.DiagramKindLabelProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.papyrus.uml.diagram.wizards.template.ModelTemplateDescription;
import org.eclipse.papyrus.uml.diagram.wizards.template.SelectModelTemplateComposite;
+import org.eclipse.papyrus.uml.diagram.wizards.widget.FileChooser;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.PlatformUI;
/**
* This WizardPage to select the kind of Papyrus Diagram. List all kind of diagrams registered with
@@ -62,17 +52,11 @@ public class SelectDiagramKindPage extends WizardPage {
/** The diagram name text field. */
private Text nameText;
- /** The diagram kind table viewer. */
- private CheckboxTableViewer diagramKindTableViewer;
-
- /** The my settings helper. */
- private SettingsHelper mySettingsHelper;
-
/** The select template composite. */
private SelectModelTemplateComposite selectTemplateComposite;
- /** The remember current selection. */
- private Button rememberCurrentSelection;
+ /** the select diagram Kind composite */
+ private DiagramKindComposite diagramKindComposite;
/** The my category provider. */
private final CategoryProvider myCategoryProvider;
@@ -83,6 +67,8 @@ public class SelectDiagramKindPage extends WizardPage {
/** The my creation command registry. */
private final ICreationCommandRegistry myCreationCommandRegistry;
+ private FileChooser filechooser;
+
/** The Constant DEFAULT_CREATION_COMMAND_REGISTRY. */
public static final ICreationCommandRegistry DEFAULT_CREATION_COMMAND_REGISTRY = CreationCommandRegistry.getInstance(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
@@ -121,48 +107,52 @@ public class SelectDiagramKindPage extends WizardPage {
* @param parent
* the parent {@inheritDoc}
*/
+ @Override
public void createControl(Composite parent) {
- Composite plate = new Composite(parent, SWT.NONE);
- plate.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- GridLayout gridLayout = new GridLayout(1, false);
- gridLayout.marginWidth = 10;
- plate.setLayout(gridLayout);
- setControl(plate);
-
+ Composite pageComposite = new Composite(parent, SWT.NONE);
+ pageComposite.setLayout(new GridLayout());
+ pageComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
String[] categories = getDiagramCategories();
- createNameForm(plate);
-
- createDiagramKindForm(plate);
- diagramKindTableViewer.setInput(categories);
-
- createModelTemplateComposite(plate);
-
- createRememberCurrentSelectionForm(plate);
-
+ Composite nameFormComposite = new Composite(pageComposite, SWT.NONE);
+ nameFormComposite.setLayout(new GridLayout());
+ nameFormComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ createNameForm(nameFormComposite);
+
+ Composite diagramKindComposite = new Composite(pageComposite, SWT.NONE);
+ diagramKindComposite.setLayout(new GridLayout());
+ diagramKindComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ createDiagramKindForm(diagramKindComposite);
+ this.diagramKindComposite.setInput(categories);
+
+ Composite modelTemplateComposite = new Composite(pageComposite, SWT.NONE);
+ modelTemplateComposite.setLayout(new GridLayout());
+ modelTemplateComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ createModelTemplateComposite(modelTemplateComposite);
fillInTables(categories);
- }
+ Composite profileChooserComposite = new Composite(pageComposite, SWT.NONE);
+ profileChooserComposite.setLayout(new GridLayout());
+ profileChooserComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ createProfileFileChooser(profileChooserComposite);
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.wizard.WizardPage#setWizard(org.eclipse.jface.wizard.IWizard)
- */
- @Override
- public void setWizard(IWizard newWizard) {
- super.setWizard(newWizard);
- setSettingsHelper(new SettingsHelper(getDialogSettings()));
+ setControl(pageComposite);
}
/**
- * Sets the settings helper.
- *
- * @param helper
- * the new settings helper
+ * Create the filechooser composite
+ *
+ * @param parent
*/
- protected void setSettingsHelper(SettingsHelper helper) {
- mySettingsHelper = helper;
+ private void createProfileFileChooser(Composite parent) {
+ Group group = createGroup(parent, Messages.SelectDiagramKindPage_0);
+ filechooser = new FileChooser(group, false);
+ String[] filter = { "profile.uml" }; //$NON-NLS-1$
+ filechooser.setFilterExtensions(filter);
+ }
+
+ public String getProfileURI() {
+ return filechooser.getFilePath();
}
/**
@@ -194,10 +184,8 @@ public class SelectDiagramKindPage extends WizardPage {
if (categories == null || categories.length == 0) {
return;
}
- diagramKindTableViewer.setInput(categories);
+ diagramKindComposite.setInput(categories);
selectTemplateComposite.setInput(categories);
- selectDefaultDiagramKinds(categories);
- selectDefaultDiagramTemplates(categories);
}
@@ -252,7 +240,11 @@ public class SelectDiagramKindPage extends WizardPage {
*
* @return the new diagram name
*/
- public String getDiagramName() {
+ public List<String> getDiagramName() {
+ return diagramKindComposite.getDiagramName();
+ }
+
+ public String getRootElementName() {
return nameText.getText();
}
@@ -305,42 +297,7 @@ public class SelectDiagramKindPage extends WizardPage {
*/
private void createDiagramKindForm(Composite composite) {
Group group = createGroup(composite, Messages.SelectDiagramKindPage_select_kind_group);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- group.setData(data);
-
- final Table diagramKindTable = new Table(group, SWT.NO_BACKGROUND | SWT.CHECK);
- diagramKindTable.setFont(group.getFont());
- diagramKindTable.setBackground(group.getBackground());
-
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 5;
- layout.marginWidth = 5;
- diagramKindTable.setLayout(layout);
-
- GridData data2 = new GridData(SWT.FILL, SWT.FILL, true, true);
- diagramKindTable.setLayoutData(data2);
-
- diagramKindTable.addSelectionListener(new SelectionListener() {
-
- /**
- * {@inheritDoc}
- */
- public void widgetSelected(SelectionEvent e) {
- if (e.detail == SWT.CHECK) {
- validatePage();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void widgetDefaultSelected(SelectionEvent e) {
- // does nothing
- }
- });
- diagramKindTableViewer = new CheckboxTableViewer(diagramKindTable);
- diagramKindTableViewer.setContentProvider(new DiagramKindContentProvider());
- diagramKindTableViewer.setLabelProvider(createDiagramKindLabelProvider());
+ diagramKindComposite = new DiagramKindComposite(group);
}
/**
@@ -365,9 +322,9 @@ public class SelectDiagramKindPage extends WizardPage {
private static Group createGroup(Composite parent, String name) {
Group group = new Group(parent, SWT.NONE);
group.setText(name);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 5;
- layout.marginWidth = 5;
+ GridLayout layout = new GridLayout(1, true);
+ // layout.marginHeight = 5;
+ // layout.marginWidth = 5;
group.setLayout(layout);
GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
group.setLayoutData(data);
@@ -382,40 +339,18 @@ public class SelectDiagramKindPage extends WizardPage {
*/
private void createNameForm(Composite composite) {
Group group = createGroup(composite, Messages.SelectDiagramKindPage_diagram_name_group);
-
nameText = new Text(group, SWT.BORDER);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- nameText.setLayoutData(data);
+ nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
nameText.setText(Messages.SelectDiagramKindPage_default_diagram_name);
nameText.addModifyListener(new ModifyListener() {
+ @Override
public void modifyText(ModifyEvent e) {
validatePage();
}
});
}
- /**
- * Creates the remember current selection form.
- *
- * @param composite
- * the composite
- */
- private void createRememberCurrentSelectionForm(Composite composite) {
- Composite plate = new Composite(composite, SWT.NONE);
- GridLayout layout = new GridLayout(1, false);
- layout.marginHeight = 5;
- layout.marginWidth = 5;
- plate.setLayout(layout);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- plate.setLayoutData(data);
-
- rememberCurrentSelection = new Button(plate, SWT.CHECK);
- rememberCurrentSelection.setText(Messages.SelectDiagramKindPage_remember_current_selection_text);
- rememberCurrentSelection.setToolTipText(Messages.SelectDiagramKindPage_remember_current_selection_tooltip);
-
- rememberCurrentSelection.setSelection(mySettingsHelper.rememberCurrentSelection(getDialogSettings()));
- }
/**
* Validate page.
@@ -423,39 +358,13 @@ public class SelectDiagramKindPage extends WizardPage {
* @return true, if successful
*/
private boolean validatePage() {
- if (getDiagramName() == null || getDiagramName().length() == 0) {
- updateStatus(Messages.SelectDiagramKindPage_diagram_name_is_empty);
+ if (diagramKindComposite.getDiagramName().size() == 0) {
return false;
}
- // if(getCreationCommands().isEmpty()) {
- // updateStatus("At least one diagram kind should be selected.");
- // return false;
- // }
- updateStatus(null);
return true;
}
/**
- * Update page status.
- *
- * @param message
- * is the error message.
- */
- private void updateStatus(String message) {
- setErrorMessage(message);
- setPageComplete(message == null);
- }
-
- /**
- * Checks if is remember current selection.
- *
- * @return true, if is remember current selection
- */
- public boolean isRememberCurrentSelection() {
- return rememberCurrentSelection.getSelection();
- }
-
- /**
* Gets the selected diagram kinds.
*
* @param categoryId
@@ -472,69 +381,11 @@ public class SelectDiagramKindPage extends WizardPage {
* @return the selected diagram kind descriptors
*/
protected ViewPrototype[] getSelectedPrototypes() {
- Object[] checked = diagramKindTableViewer.getCheckedElements();
- ViewPrototype[] result = Arrays.asList(checked).toArray(new ViewPrototype[checked.length]);
+ List<ViewPrototype> checked = diagramKindComposite.getCheckElement();
+ ViewPrototype[] result = checked.toArray(new ViewPrototype[checked.size()]);
return result;
}
- /**
- * Select default diagram kinds.
- *
- * @param categories
- * the categories
- */
- private void selectDefaultDiagramKinds(String[] categories) {
- Set<String> kinds = new HashSet<String>();
- for (String category : categories) {
- kinds.addAll(mySettingsHelper.getDefaultDiagramKinds(category));
- }
- CreationCommandDescriptor[] elementsToCheck = findCreationCommandDescriptorsFor(kinds);
- diagramKindTableViewer.setCheckedElements(elementsToCheck);
- }
-
- /**
- * Find creation command descriptors for.
- *
- * @param kinds
- * the kinds
- * @return the creation command descriptor[]
- */
- protected CreationCommandDescriptor[] findCreationCommandDescriptorsFor(Collection<String> kinds) {
- List<CreationCommandDescriptor> result = new ArrayList<CreationCommandDescriptor>();
- Collection<CreationCommandDescriptor> availableDescriptors = getCreationCommandRegistry().getCommandDescriptors();
- for (CreationCommandDescriptor desc : availableDescriptors) {
- if (kinds.contains(desc.getCommandId())) {
- result.add(desc);
- }
- }
- return result.toArray(new CreationCommandDescriptor[result.size()]);
- }
-
- /**
- * Select default diagram templates.
- *
- * @param categories
- * the categories
- */
- private void selectDefaultDiagramTemplates(String[] categories) {
- List<String> defaultTemplates = new ArrayList<String>();
- List<Object> availableTemplates = new ArrayList<Object>();
- for (String category : categories) {
- defaultTemplates.addAll(mySettingsHelper.getDefaultTemplates(category));
- }
-
- availableTemplates.addAll(Arrays.asList(selectTemplateComposite.getContentProvider().getElements(categories)));
-
- for (Object next : availableTemplates) {
- ModelTemplateDescription desc = (ModelTemplateDescription) next;
-
- if (defaultTemplates.contains(desc.getUml_path())) {
- selectTemplateComposite.selectElement(desc);
- return;
- }
- }
- }
-
/**
* Gets the creation command registry.
@@ -558,4 +409,14 @@ public class SelectDiagramKindPage extends WizardPage {
String[] getCurrentCategories();
}
+ public List<ModelTemplateDescription> getTemplateTransfo() {
+ return selectTemplateComposite.getTemplateTransfoPath();
+ }
+
+ @Override
+ public void performHelp() {
+ PlatformUI.getWorkbench().getHelpSystem().displayHelp("org.eclipse.papyrus.uml.diagram.wizards.Kind"); //$NON-NLS-1$
+
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRootElementPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRootElementPage.java
index 3ba224e651c..23f0a01f902 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRootElementPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectRootElementPage.java
@@ -43,7 +43,7 @@ import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.ModelUtils;
import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.diagram.wizards.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
@@ -206,8 +206,8 @@ public class SelectRootElementPage extends WizardPage {
}
if (!resource.getErrors().isEmpty()) {
StringBuilder builder = new StringBuilder();
- for (Diagnostic d : resource.getErrors()) {
- builder.append(String.format("<li>%s</li>", d.getMessage().replaceAll("\\<.*?\\>", ""))); // Basic strip tags to avoid breaking the NotificationBuilder with invalid HTML
+ for(Diagnostic d : resource.getErrors()) {
+ builder.append(String.format("<li>%s</li>", d.getMessage().replaceAll("\\<.*?\\>", ""))); //Basic strip tags to avoid breaking the NotificationBuilder with invalid HTML //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
error(builder.toString());
}
@@ -220,7 +220,7 @@ public class SelectRootElementPage extends WizardPage {
*/
private void error(String message) {
try {
- NotificationBuilder.createWarningPopup(String.format("<form>Problems encountered in your input model, after the save you could lose data :%s</form>", message)).setHTML(true).setType(Type.WARNING).run();
+ NotificationBuilder.createWarningPopup(String.format("<form>Problems encountered in your input model, after the save you could lose data :%s</form>", message)).setHTML(true).setType(Type.WARNING).run(); //$NON-NLS-1$
} catch (Exception ex) {
Activator.log.error(message, ex);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectStorageProviderPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectStorageProviderPage.java
index 73b96775cfd..bfa995cf65a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectStorageProviderPage.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/pages/SelectStorageProviderPage.java
@@ -23,8 +23,9 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.papyrus.uml.diagram.wizards.Activator;
-import org.eclipse.papyrus.uml.diagram.wizards.INewModelStorageProvider;
-import org.eclipse.papyrus.uml.diagram.wizards.NewModelStorageProviderRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.INewModelStorageProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.NewModelStorageProviderRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -58,8 +59,8 @@ public class SelectStorageProviderPage
this.registry = registry;
- setTitle("Model Storage");
- setDescription("Select the kind of storage for the new model.");
+ setTitle(Messages.SelectStorageProviderPage_0);
+ setDescription(Messages.SelectStorageProviderPage_1);
}
public void createControl(Composite parent) {
@@ -71,7 +72,7 @@ public class SelectStorageProviderPage
myComposite.setLayout(new GridLayout());
new Label(myComposite, SWT.NONE)
- .setText("Where would you like to store the new model?");
+ .setText(Messages.SelectStorageProviderPage_2);
Composite selectionArea = new Composite(myComposite, SWT.NONE);
selectionArea.setLayout(new GridLayout());
@@ -197,7 +198,7 @@ public class SelectStorageProviderPage
next.selectionChanged(event);
} catch (Exception e) {
Activator.log.error(
- "Uncaught exception in selection listener.", e);
+ Messages.SelectStorageProviderPage_3, e);
}
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractNewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractNewModelStorageProvider.java
new file mode 100644
index 00000000000..57b6f267488
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractNewModelStorageProvider.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * 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.diagram.wizards.providers;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * Partial implementation of the {@link INewModelStorageProvider} protocol.
+ */
+public abstract class AbstractNewModelStorageProvider implements INewModelStorageProvider {
+
+ public void init(CreateModelWizard wizard, IStructuredSelection selection) {
+ // pass
+ }
+
+ public IStatus validateDiagramCategories(String... newCategories) {
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Creates an {@link IFileEditorInput} for workspace resource URIs, or an {@link URIEditorInput} otherwise.
+ */
+ public IEditorInput createEditorInput(URI uri) {
+ if(uri.isPlatformResource()) {
+ return new FileEditorInput(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true))));
+ } else {
+ return new URIEditorInput(uri);
+ }
+ }
+
+ public ISelectProviderPart createSelectProviderPart() {
+ return null;
+ }
+
+ public SelectDiagramCategoryPage getDiagramCategoryPage() {
+ return null;
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractSelectStorageProviderPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractSelectStorageProviderPart.java
new file mode 100644
index 00000000000..1971bb23fb1
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/AbstractSelectStorageProviderPart.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * 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.diagram.wizards.providers;
+
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.INewModelStorageProvider.ISelectProviderPart;
+
+/**
+ * This is the AbstractSelectStorageProviderPart type. Enjoy.
+ */
+public abstract class AbstractSelectStorageProviderPart
+ implements ISelectProviderPart {
+
+ private final CopyOnWriteArrayList<IPartCompleteListener> listeners = new CopyOnWriteArrayList<IPartCompleteListener>();
+
+ private boolean enabled;
+
+ public AbstractSelectStorageProviderPart() {
+ super();
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+
+ enableControls(enabled);
+ }
+
+ protected abstract void enableControls(boolean enabled);
+
+ public void addPartCompleteListener(IPartCompleteListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ public void removePartCompleteListener(IPartCompleteListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected void firePartCompleteChanged() {
+ for (IPartCompleteListener next : listeners) {
+ try {
+ next.partCompletenessChanged(this);
+ } catch (Exception e) {
+ Activator.log.error(
+ "Uncaught exception in part-complete listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/INewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/INewModelStorageProvider.java
new file mode 100644
index 00000000000..8d9c93a1475
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/INewModelStorageProvider.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * 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.diagram.wizards.providers;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+
+/**
+ * A protocol for a provider of pluggable wizard pages and resource creation for
+ * the {@link CreateModelWizard}. Implementations are contributed on the <tt>org.eclipse.papyrus.uml.diagram.wizards.newModelStorageProviders</tt>
+ * extension point.
+ */
+public interface INewModelStorageProvider {
+
+ /**
+ * Queries whether I am an appropriate storage provider for the context
+ * implied by the specified selection on which the wizard is launched. For
+ * example, if the selection includes resources stored in my domain.
+ *
+ * @param initialSelection
+ * the workbench or other selection on which the wizard was
+ * launched
+ *
+ * @return whether I am appropriate for the selection
+ */
+ boolean canHandle(IStructuredSelection initialSelection);
+
+ void init(CreateModelWizard wizard, IStructuredSelection selection);
+
+ List<? extends IWizardPage> createPages();
+
+ IStatus validateDiagramCategories(String... newCategories);
+
+ /**
+ * Create the URI identifying a new model, as indicated by my wizard page
+ * that (presumably) allowed the user to specify the model's location within
+ * my storage domain.
+ *
+ * @param diagramCategoryID
+ * the ID of the diagram category selected in the wizard
+ *
+ * @return the URI of the new model's principal resource
+ */
+ URI createNewModelURI(String diagramCategoryID);
+
+ /**
+ * Create an editor input appropriate for opening the specified URI in my
+ * storage domain.
+ *
+ * @param uri
+ * the URI of the principal model resource to open
+ *
+ * @return a suitable editor input (must not be {@code null}). If the result
+ * is not an {@link IFileEditorInput} or other known input type that
+ * correlates to the resource URI, then it is expected that the
+ * input's name be the resource name so that the best-matching
+ * editor may be found to open it
+ */
+ IEditorInput createEditorInput(URI uri);
+
+ /**
+ * Creates a part for the storage provider selection page of the wizard.
+ *
+ * @return the storage-provider selection page part, or {@code null} if none
+ * is required
+ */
+ ISelectProviderPart createSelectProviderPart();
+
+ SelectDiagramCategoryPage getDiagramCategoryPage();
+
+ //
+ // Nested types
+ //
+
+ interface ISelectProviderPart {
+
+ Control createControl(Composite parent);
+
+ boolean isEnabled();
+
+ void setEnabled(boolean enabled);
+
+ boolean isPartComplete();
+
+ void addPartCompleteListener(IPartCompleteListener listener);
+
+ void removePartCompleteListener(IPartCompleteListener listener);
+
+ interface IPartCompleteListener {
+
+ void partCompletenessChanged(ISelectProviderPart part);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/NewModelStorageProviderRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/NewModelStorageProviderRegistry.java
new file mode 100644
index 00000000000..3e0402f268f
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/NewModelStorageProviderRegistry.java
@@ -0,0 +1,223 @@
+/*****************************************************************************
+ * 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.diagram.wizards.providers;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.expressions.EvaluationContext;
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.ExpressionConverter;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.services.IEvaluationService;
+
+/**
+ * This is the NewModelStorageProviderRegistry type. Enjoy.
+ */
+public class NewModelStorageProviderRegistry implements Iterable<NewModelStorageProviderRegistry.Descriptor> {
+
+ private static final String EXTPT_ID = Activator.PLUGIN_ID + ".newModelStorageProviders"; //$NON-NLS-1$
+
+ private final List<Descriptor> descriptors = new java.util.ArrayList<Descriptor>();
+
+ private final IEvaluationService evaluationService;
+
+ public NewModelStorageProviderRegistry(IEvaluationService evaluationService) {
+ this.evaluationService = evaluationService;
+
+ for(IConfigurationElement config : sort(Platform.getExtensionRegistry().getConfigurationElementsFor(EXTPT_ID))) {
+
+ if("provider".equals(config.getName())) { //$NON-NLS-1$
+ descriptors.add(new Descriptor(config));
+ }
+ }
+ }
+
+ public Iterator<Descriptor> iterator() {
+ return descriptors.iterator();
+ }
+
+ public int size() {
+ return descriptors.size();
+ }
+
+ // sort configuration elements by contributing plug-in. Our own first, all
+ // others as they come
+ private List<IConfigurationElement> sort(IConfigurationElement[] providerElements) {
+
+ List<IConfigurationElement> result = new java.util.ArrayList<IConfigurationElement>(Arrays.asList(providerElements));
+
+ Collections.sort(result, new Comparator<IConfigurationElement>() {
+
+ public int compare(IConfigurationElement o1, IConfigurationElement o2) {
+
+ int result;
+
+ String plugin1 = o1.getContributor().getName();
+ String plugin2 = o2.getContributor().getName();
+
+ if(plugin1.equals(plugin2)) {
+ result = 0;
+ } else if(Activator.PLUGIN_ID.equals(plugin1)) {
+ result = -1;
+ } else if(Activator.PLUGIN_ID.equals(plugin2)) {
+ result = +1;
+ } else {
+ result = 0;
+ }
+
+ return result;
+ }
+ });
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ public class Descriptor implements INewModelStorageProvider {
+
+ private final IConfigurationElement config;
+
+ private String label;
+
+ private Expression matchSelection;
+
+ private INewModelStorageProvider instance;
+
+ Descriptor(IConfigurationElement config) {
+ this.config = config;
+
+ this.label = config.getAttribute("name"); //$NON-NLS-1$
+
+ initMatchExpression(config);
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ INewModelStorageProvider getInstance() {
+ if(instance == null) {
+ try {
+ instance = (INewModelStorageProvider)config.createExecutableExtension("class"); //$NON-NLS-1$
+ } catch (ClassCastException e) {
+ Activator.log.error("Storage provider does not implement INewModelStorageProvider interface.", //$NON-NLS-1$
+ e);
+ } catch (Exception e) {
+ Activator.log.error("Could not instantiate storage provider.", e); //$NON-NLS-1$
+ }
+
+ if(instance == null) {
+ instance = new NullProvider();
+ }
+ }
+
+ return instance;
+ }
+
+ public boolean canHandle(IStructuredSelection initialSelection) {
+ boolean result;
+
+ if(matchSelection != null) {
+ List<?> selection = initialSelection.toList();
+ IEvaluationContext ctx = new EvaluationContext(evaluationService.getCurrentState(), selection);
+ ctx.addVariable("selection", selection); //$NON-NLS-1$
+
+ EvaluationResult evalResult = EvaluationResult.FALSE;
+ try {
+ evalResult = matchSelection.evaluate(ctx);
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+
+ result = EvaluationResult.TRUE.equals(evalResult);
+ } else {
+ result = getInstance().canHandle(initialSelection);
+ }
+
+ return result;
+ }
+
+ public void init(CreateModelWizard wizard, IStructuredSelection selection) {
+ getInstance().init(wizard, selection);
+ }
+
+ public List<? extends IWizardPage> createPages() {
+ return getInstance().createPages();
+ }
+
+ public URI createNewModelURI(String diagramCategoryID) {
+ return getInstance().createNewModelURI(diagramCategoryID);
+ }
+
+ public IEditorInput createEditorInput(URI uri) {
+ return getInstance().createEditorInput(uri);
+ }
+
+ public IStatus validateDiagramCategories(String... newCategories) {
+ return getInstance().validateDiagramCategories(newCategories);
+ }
+
+ public ISelectProviderPart createSelectProviderPart() {
+ return getInstance().createSelectProviderPart();
+ }
+
+ private void initMatchExpression(IConfigurationElement parentConfig) {
+ IConfigurationElement[] configs = parentConfig.getChildren("enablement"); //$NON-NLS-1$
+ if(configs.length > 0) {
+ try {
+ matchSelection = ExpressionConverter.getDefault().perform(configs[0]);
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+ }
+ }
+
+ public SelectDiagramCategoryPage getDiagramCategoryPage() {
+ return getInstance().getDiagramCategoryPage();
+ }
+ }
+
+ private static final class NullProvider extends AbstractNewModelStorageProvider {
+
+ public boolean canHandle(IStructuredSelection initialSelection) {
+ return false;
+ }
+
+ public List<? extends IWizardPage> createPages() {
+ return Collections.emptyList();
+ }
+
+ public URI createNewModelURI(String diagramCategoryID) {
+ return null; // I don't create models
+ }
+
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/WorkspaceNewModelStorageProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/WorkspaceNewModelStorageProvider.java
new file mode 100644
index 00000000000..f0c46d56cfd
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/providers/WorkspaceNewModelStorageProvider.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * 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.diagram.wizards.providers;
+
+import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.adapt;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.papyrus.commands.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewDiagramForExistingModelPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
+
+/**
+ * This is the WorkspaceNewModelStorageProvider type. Enjoy.
+ */
+public class WorkspaceNewModelStorageProvider extends AbstractNewModelStorageProvider {
+
+ private CreateModelWizard wizard;
+
+ /** New model file page for the file. */
+ private NewModelFilePage newModelFilePage;
+
+ private SelectDiagramCategoryPage newDiagramCategoryPage;
+
+ public WorkspaceNewModelStorageProvider() {
+ super();
+ }
+
+ @Override
+ public boolean canHandle(IStructuredSelection initialSelection) {
+ boolean result = false;
+
+ for (Object next : initialSelection.toList()) {
+ if (adapt(next, IResource.class) != null) {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void init(CreateModelWizard wizard, IStructuredSelection selection) {
+ super.init(wizard, selection);
+
+ this.wizard = wizard;
+ newModelFilePage = createNewModelFilePage(selection);
+ newDiagramCategoryPage = createNewDiagramCategoryPage(selection);
+ }
+
+
+
+ @Override
+ public List<? extends IWizardPage> createPages() {
+ if (newModelFilePage == null && newDiagramCategoryPage == null) {
+ return Collections.emptyList();
+ }
+
+ return Arrays.asList(newDiagramCategoryPage, newModelFilePage);
+ }
+
+ @Override
+ public IStatus validateDiagramCategories(String... newCategories) {
+ if (newModelFilePage != null) {
+ String firstCategory = newCategories.length > 0 ? newCategories[0] : null;
+ if (newCategories.length > 0) {
+ // 316943 - [Wizard] Wrong suffix for file name when creating a
+ // profile model
+ return newModelFilePage.diagramExtensionChanged(wizard.getDiagramFileExtension(firstCategory));
+ }
+
+ }
+
+ return super.validateDiagramCategories(newCategories);
+ }
+
+ /**
+ * Creates the new model file page, if required.
+ *
+ * @param selection
+ * the selection
+ *
+ * @return the new model file page, or {@code null} if none
+ */
+ protected NewModelFilePage createNewModelFilePage(IStructuredSelection selection) {
+
+ if (wizard.isCreateProjectWizard() || wizard.isCreateMultipleModelsWizard()) {
+
+ return null;
+ }
+
+ // IFile selectedFile = getSelectedFile(selection);
+ URI selectedResourceURI = WizardsHelper.getSelectedResourceURI(selection);
+
+ if (isCreateFromExistingDomainModel() && selectedResourceURI != null) {
+ return new NewDiagramForExistingModelPage(selection, wizard.getModelKindName(), getDiagramFileName(selectedResourceURI) + "." + wizard.getDiagramFileExtension(null), wizard.getDiagramFileExtension(null)); //$NON-NLS-1$
+ }
+
+ return new NewModelFilePage(selection, wizard.getModelKindName());
+ }
+
+ /**
+ * Suggests a name of diagram file for the domain model file without
+ * extension.
+ *
+ * @param domainModel
+ * the domain model
+ * @return the diagram file name
+ */
+ protected String getDiagramFileName(URI domainModelURI) {
+ return domainModelURI.trimFileExtension().lastSegment();
+ }
+
+ protected boolean isCreateFromExistingDomainModel() {
+ return wizard.isInitModelWizard() && ((InitModelWizard) wizard).isCreateFromExistingDomainModel();
+ }
+
+ @Override
+ public URI createNewModelURI(String categoryId) {
+ IFile newFile = newModelFilePage.createNewFile();
+ URI fileURI = URI.createPlatformResourceURI(newFile.getFullPath().toString(), true);
+ try {
+ newFile.delete(true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ return fileURI;
+ // return (newFile == null) ? null :
+ }
+
+ private SelectDiagramCategoryPage createNewDiagramCategoryPage(IStructuredSelection selection) {
+ if (wizard.isCreateProjectWizard() || wizard.isCreateMultipleModelsWizard() || !wizard.isPapyrusRootWizard()) {
+
+ return null;
+ }
+ return new SelectDiagramCategoryPage();
+ }
+
+ @Override
+ public SelectDiagramCategoryPage getDiagramCategoryPage() {
+ return this.newDiagramCategoryPage;
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/AbstractModelTemplateContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/AbstractModelTemplateContentProvider.java
new file mode 100644
index 00000000000..d88fcbad46e
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/AbstractModelTemplateContentProvider.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.template;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator;
+
+
+public abstract class AbstractModelTemplateContentProvider implements IStructuredContentProvider {
+
+ /** The Constant EXTENSION_POINT_ID. */
+ protected static final String EXTENSION_POINT_ID = "org.eclipse.papyrus.uml.diagram.wizards.templates"; //$NON-NLS-1$
+
+ /** The Constant ATTRIBUTE_NAME. */
+ protected static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
+
+ /** The Constant ATTRIBUTE_FILE. */
+ protected static final String ATTRIBUTE_UML_FILE = "file"; //$NON-NLS-1$
+
+ /** The Constant ATTRIBUTE_NOTATION_FILE. */
+ protected static final String ATTRIBUTE_NOTATION_FILE = "notation_file"; //$NON-NLS-1$
+
+ /** The Constant ATTRIBUTE_DI_FILE. */
+ protected static final String ATTRIBUTE_DI_FILE = "di_file"; //$NON-NLS-1$
+
+ /** The Constant ATTRIBUTE_LANGUAGE. */
+ protected static final String ATTRIBUTE_LANGUAGE = "language"; //$NON-NLS-1$
+
+ protected static final String TRANSFO_URI = "Transformation_URI"; //$NON-NLS-1$
+
+ /** The my template descriptions. */
+ protected ModelTemplateDescription[] myTemplateDescriptions;
+
+ /**
+ * Dispose.
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ @Override
+ public void dispose() {
+
+ }
+
+ /**
+ * Gets the templates description.
+ *
+ * @return the templates description
+ */
+ protected ModelTemplateDescription[] getTemplatesDescription() {
+ if (myTemplateDescriptions == null) {
+ List<ModelTemplateDescription> templates = new ArrayList<ModelTemplateDescription>();
+
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ // get all the extensions configured into the extension point corresponding to the 'templates' Point ID from the 'org.eclipse.papyrus.uml.diagram.wizards' plugin
+ IExtension[] extensions = registry.getExtensionPoint(EXTENSION_POINT_ID).getExtensions();
+
+ for (IExtension extension : extensions) {
+ templates.addAll(processExtension(extension));
+ }
+ myTemplateDescriptions = templates.toArray(new ModelTemplateDescription[templates.size()]);
+ }
+ return myTemplateDescriptions;
+ }
+
+ /**
+ * Process extension.
+ *
+ * @param extension
+ * the extension
+ * @return the collection
+ */
+ private Collection<ModelTemplateDescription> processExtension(IExtension extension) {
+ List<ModelTemplateDescription> templates = new ArrayList<ModelTemplateDescription>();
+ // 'extension.getConfigurationElements()' Returns all configuration elements declared by this extension.
+ // These elements are a direct reflection of the configuration markup supplied in the manifest (plugin.xml) file for the plug-in that declares this extension.
+ // Each extension can contain multiple elements, e.g. org.eclipse.papyrus.robotml.templaterepository's extension
+ for (IConfigurationElement configElement : extension.getConfigurationElements()) {
+ // Construct the tempalte from the element's parameters, e.g. template's notation_file, name, ... and transformation's id or name
+ ModelTemplateDescription template = new ModelTemplateDescription(configElement.getAttribute(ATTRIBUTE_NAME), extension.getContributor().getName(), configElement.getAttribute(ATTRIBUTE_UML_FILE),
+ configElement.getAttribute(ATTRIBUTE_NOTATION_FILE), configElement.getAttribute(ATTRIBUTE_DI_FILE));
+ template.setLanguage(configElement.getAttribute(ATTRIBUTE_LANGUAGE));
+ template.setTransfo(configElement.getAttribute(TRANSFO_URI));
+ templates.add(template);
+ }
+ return templates;
+ }
+
+ /**
+ * Gets the elements.
+ *
+ * @param inputElement
+ * the input element
+ * @return the elements
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+ */
+ @Override
+ public abstract Object[] getElements(Object inputElement);
+
+ /**
+ * Input changed.
+ *
+ * @param viewer
+ * the viewer
+ * @param oldInput
+ * the old input
+ * @param newInput
+ * the new input
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ if (viewer instanceof TableViewer) {
+ ((TableViewer) viewer).add(getElements(null));
+ }
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/InitFromTemplateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/InitFromTemplateCommand.java
index e86194ab463..53c2ebcdd75 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/InitFromTemplateCommand.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/InitFromTemplateCommand.java
@@ -1,233 +1,33 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
- *
- *
- * 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:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- * Saadia Dhouib (CEA LIST) - Implementation of loading diagrams from template files (.uml, .di , .notation)
- * Christian W. Damus (CEA) - bug 422257
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards.template;
-
-import java.io.IOException;
-import java.util.Collection;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.transaction.RecordingCommand;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModelUtils;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashModel;
-import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
-import org.eclipse.papyrus.infra.core.sashwindows.di.TabFolder;
-import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
-import org.eclipse.papyrus.uml.diagram.wizards.Activator;
-import org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
-
-
-/**
- * The Class InitFromTemplateCommand.
- */
-public class InitFromTemplateCommand extends RecordingCommand {
-
- /** The model-set in which to create the new resources. */
- private ModelSet modelSet;
-
- /** The my model resource. */
- private final Resource myModelUMLResource;
-
- /** The my model di resource. */
- private final Resource myModelDiResource;
-
- /** The my model notation resource. */
- private final Resource myModelNotationResource;
-
- /** The my template path. */
- private final String myUmlTemplatePath;
-
- /** The my di template path. */
- private final String myDiTemplatePath;
-
- /** The my notation template path. */
- private final String myNotationTemplatePath;
-
- /** The my plugin id. */
- private final String myPluginId;
-
- /**
- * Instantiates a new inits the from template command.
- *
- * @param editingDomain
- * the editing domain
- * @param diResouceSet
- * the di resouce set
- * @param pluginId
- * the plugin id
- * @param umlTemplatePath
- * the uml template path
- * @param notationTemplatePath
- * the notation template path
- * @param diTemplatePath
- * the di template path
- */
- public InitFromTemplateCommand(TransactionalEditingDomain editingDomain, ModelSet modelSet, String pluginId, String umlTemplatePath, String notationTemplatePath, String diTemplatePath) {
- super(editingDomain);
-
- this.modelSet = modelSet;
- myModelUMLResource = UmlUtils.getUmlResource(modelSet);
- myModelDiResource = DiModelUtils.getDiResource(modelSet);
- myModelNotationResource = NotationUtils.getNotationResource(modelSet);
- myPluginId = pluginId;
- myUmlTemplatePath = umlTemplatePath;
- myDiTemplatePath = diTemplatePath;
- myNotationTemplatePath = notationTemplatePath;
-
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- */
- @Override
- protected void doExecute() {
- try {
- initializeFromTemplate();
- // verify if .di file and .notation file were filled in the org.eclipse.papyrus.uml.diagram.wizards.templates extension
-
- } catch (IOException e) {
- Activator.log.error("Initialization from template failed", e); //$NON-NLS-1$
- }
- }
-
-
-
-
- /**
- * Initialize from template.
- *
- *
- * @throws IOException
- * Signals that an I/O exception has occurred.
- */
- private void initializeFromTemplate() throws IOException {
- Resource templateDiResource = null;
- Resource templateNotationResource = null;
- Resource templateUmlResource = null;
-
-
- try {
- // 0. initalization of the UML object
- templateUmlResource = loadTemplateResource(myUmlTemplatePath);
- EcoreUtil.resolveAll(templateUmlResource);
-
- // 1. test if di and notation exist
- // verify if .di file and .notation file were filled in the org.eclipse.papyrus.uml.diagram.wizards.templates extension
- if ((myDiTemplatePath != null) && (myNotationTemplatePath != null)) {
- // 2.1 verify if the .di , .notation and .uml files have the same name
- String diFileName = WizardsHelper.getFileNameWithoutExtension(myDiTemplatePath);
- String umlFileName = WizardsHelper.getFileNameWithoutExtension(myUmlTemplatePath);
- String notationFileName = WizardsHelper.getFileNameWithoutExtension(myNotationTemplatePath);
-
- if (diFileName.contentEquals(umlFileName) && diFileName.contentEquals(notationFileName)) {
-
- // 1.2 load di resource
- if (myDiTemplatePath != null) {
- templateDiResource = loadTemplateResource(myDiTemplatePath);
- EcoreUtil.resolveAll(templateDiResource);
- }
-
- // 1.3 load notation resource
- if (myNotationTemplatePath != null) {
- templateNotationResource = loadTemplateResource(myNotationTemplatePath);
- EcoreUtil.resolveAll(templateNotationResource);
- }
-
- }
- }
-
- // 2. copy all elements
- EcoreUtil.Copier copier = new EcoreUtil.Copier();
- Collection<EObject> umlObjects = copier.copyAll(templateUmlResource.getContents());
- Collection<EObject> diObjects = (templateDiResource == null) ? null : copier.copyAll(templateDiResource.getContents());
- Collection<EObject> notationObjects = (templateNotationResource == null) ? null : copier.copyAll(templateNotationResource.getContents());
- copier.copyReferences();
-
-
- // 3. set copied elements in goods resources
- myModelUMLResource.getContents().addAll(umlObjects);
- if (diObjects != null) {
- TabFolder currentSelection = DiUtils.lookupCurrentTabFolderSelection(myModelDiResource);
- if (currentSelection != null){
- for (EObject eObject : diObjects) {
- if (eObject instanceof SashWindowsMngr){
- SashWindowsMngr sashWindowsMngr = (SashWindowsMngr) eObject;
- SashModel sashModel = sashWindowsMngr.getSashModel();
- if (sashModel != null){
- TabFolder tabFolder = sashModel.getCurrentSelection();
- if (tabFolder != null){
- currentSelection.getChildren().addAll(tabFolder.getChildren());
- }
- }
- }
- }
- }
- }
- if (notationObjects != null) {
- myModelNotationResource.getContents().addAll(notationObjects);
- }
- } finally {
- if (templateUmlResource != null) {
- unload(templateUmlResource);
- }
- if (templateNotationResource != null) {
- unload(templateNotationResource);
- }
- if (templateDiResource != null) {
- unload(templateDiResource);
- }
- }
- }
-
-
-
- /**
- * Load template resource.
- *
- * @param path
- * the path
- * @return the resource
- */
- private Resource loadTemplateResource(String path) {
- java.net.URL templateURL = Platform.getBundle(myPluginId).getResource(path);
- String fullUri = templateURL.getPath();
- URI uri = URI.createPlatformPluginURI(myPluginId + fullUri, true);
- Resource resource = modelSet.getResource(uri, true);
- if (resource.isLoaded()) {
- return resource;
- }
- return null;
- }
-
-
- private void unload(Resource resource) {
- resource.unload();
- resource.eAdapters().clear();
- modelSet.getResources().remove(resource);
- }
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ *
+ * 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Saadia Dhouib (CEA LIST) - Implementation of loading diagrams from template files (.uml, .di , .notation)
+ * Christian W. Damus (CEA) - bug 422257
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.template;
+
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+
+/**
+ * The Class InitFromTemplateCommand.
+ */
+public class InitFromTemplateCommand extends org.eclipse.papyrus.uml.diagram.wizards.command.InitFromTemplateCommand {
+
+ public InitFromTemplateCommand(TransactionalEditingDomain editingDomain, ModelSet modelSet, String pluginId, String umlTemplatePath, String notationTemplatePath, String diTemplatePath) {
+ super(editingDomain, modelSet, pluginId, umlTemplatePath, notationTemplatePath, diTemplatePath);
+
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateDescription.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateDescription.java
index 0ec56ffed75..d904fc9b08c 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateDescription.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateDescription.java
@@ -41,19 +41,21 @@ public class ModelTemplateDescription {
/** The language. */
private String language;
+ private String transfoURI;
+
/**
* Instantiates a new model template description.
*
* @param name
- * the name
+ * the name
* @param pluginId
- * the plugin id
+ * the plugin id
* @param uml_path
- * the uml_path
+ * the uml_path
* @param notation_path
- * the notation_path
+ * the notation_path
* @param di_path
- * the di_path
+ * the di_path
*/
public ModelTemplateDescription(String name, String pluginId, String uml_path, String notation_path, String di_path) {
super();
@@ -64,13 +66,14 @@ public class ModelTemplateDescription {
this.setNotation_path(notation_path);
this.setUml_path(uml_path);
this.pluginId = pluginId;
+
}
/**
* Sets the language.
*
* @param language
- * the new language
+ * the new language
*/
public void setLanguage(String language) {
this.language = language;
@@ -106,7 +109,7 @@ public class ModelTemplateDescription {
*/
public String getFileName() {
// String[] pathParts = uml_path.split("/"); //$NON-NLS-1$
- // return pathParts[pathParts.length - 1];
+ // return pathParts[pathParts.length - 1];
return WizardsHelper.getFileNameWithoutExtension(uml_path);
}
@@ -141,12 +144,20 @@ public class ModelTemplateDescription {
* Sets the uml_path.
*
* @param uml_path
- * the new uml_path
+ * the new uml_path
*/
public void setUml_path(String uml_path) {
this.uml_path = uml_path;
}
+ public void setTransfo(String transfoURI) {
+ this.transfoURI = transfoURI;
+ }
+
+ public String getTransfoURI() {
+ return this.transfoURI;
+ }
+
/**
* Gets the di_path.
*
@@ -160,7 +171,7 @@ public class ModelTemplateDescription {
* Sets the di_path.
*
* @param di_path
- * the new di_path
+ * the new di_path
*/
public void setDi_path(String di_path) {
this.di_path = di_path;
@@ -179,10 +190,12 @@ public class ModelTemplateDescription {
* Sets the notation_path.
*
* @param notation_path
- * the new notation_path
+ * the new notation_path
*/
public void setNotation_path(String notation_path) {
this.notation_path = notation_path;
}
-} \ No newline at end of file
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateTransfoProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateTransfoProvider.java
new file mode 100644
index 00000000000..75bd30099ff
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplateTransfoProvider.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * @author Thibault
+ *
+ */
+public class ModelTemplateTransfoProvider extends AbstractModelTemplateContentProvider {
+ // This class is used to populate SelectModelTemplateComposite's templateTableViewer
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.template.ModelTemplatesContentProvider#getElements(java.lang.Object)
+ *
+ * @param inputElement
+ * @return
+ */
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ // InputElement is the value of the selected language (radio button) from the SelectDiagramCategoryPage, e.g. "uml"
+
+ if (inputElement instanceof Object[]) {
+ List<ModelTemplateDescription> result = new ArrayList<ModelTemplateDescription>();
+
+ for (Object next : (Object[]) inputElement) {
+ if (next instanceof String) {
+ // Therefore diagramCategory is of the same type
+ String diagramCategory = (String) next;
+ for (ModelTemplateDescription template : getTemplatesDescription()) {
+
+ // For the QVT transformation, a link to the transformation model was given to the element and therefore it had the corresponding transfoURI
+ // The models Templates do not have this information and that was how they were sorted in the tableViewer/comboBox
+ // if ((diagramCategory == null || diagramCategory.equals(template.getLanguage())) && template.getTransfoURI() != null) {
+ if ((diagramCategory == null || diagramCategory.equals(template.getLanguage())) && template.getDi_path() == null) {
+ result.add(template);
+ }
+ }
+ }
+ }
+ return result.toArray();
+ }
+
+ return new Object[0];
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesContentProvider.java
index e785abed1a5..24838286039 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesContentProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesContentProvider.java
@@ -14,90 +14,13 @@
package org.eclipse.papyrus.uml.diagram.wizards.template;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.List;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-
/**
* The Class ModelTemplatesContentProvider.
*/
-public class ModelTemplatesContentProvider implements IStructuredContentProvider {
-
- /** The Constant EXTENSION_POINT_ID. */
- private static final String EXTENSION_POINT_ID = "org.eclipse.papyrus.uml.diagram.wizards.templates"; //$NON-NLS-1$
-
- /** The Constant ATTRIBUTE_NAME. */
- private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
-
- /** The Constant ATTRIBUTE_FILE. */
- private static final String ATTRIBUTE_UML_FILE = "file"; //$NON-NLS-1$
-
- /** The Constant ATTRIBUTE_NOTATION_FILE. */
- private static final String ATTRIBUTE_NOTATION_FILE = "notation_file"; //$NON-NLS-1$
-
- /** The Constant ATTRIBUTE_DI_FILE. */
- private static final String ATTRIBUTE_DI_FILE = "di_file"; //$NON-NLS-1$
-
- /** The Constant ATTRIBUTE_LANGUAGE. */
- private static final String ATTRIBUTE_LANGUAGE = "language"; //$NON-NLS-1$
-
- /** The my template descriptions. */
- private ModelTemplateDescription[] myTemplateDescriptions;
-
- /**
- * Dispose.
- *
- * @see org.eclipse.jface.viewers.IContentProvider#dispose()
- */
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * Gets the templates description.
- *
- * @return the templates description
- */
- private ModelTemplateDescription[] getTemplatesDescription() {
- if (myTemplateDescriptions == null) {
- List<ModelTemplateDescription> templates = new ArrayList<ModelTemplateDescription>();
-
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtension[] extensions = registry.getExtensionPoint(EXTENSION_POINT_ID).getExtensions();
-
- for (IExtension extension : extensions) {
- templates.addAll(processExtension(extension));
- }
- myTemplateDescriptions = templates.toArray(new ModelTemplateDescription[templates.size()]);
- }
- return myTemplateDescriptions;
- }
-
- /**
- * Process extension.
- *
- * @param extension
- * the extension
- * @return the collection
- */
- private Collection<ModelTemplateDescription> processExtension(IExtension extension) {
- List<ModelTemplateDescription> templates = new ArrayList<ModelTemplateDescription>();
- for (IConfigurationElement configElement : extension.getConfigurationElements()) {
- ModelTemplateDescription template = new ModelTemplateDescription(configElement.getAttribute(ATTRIBUTE_NAME), extension.getContributor().getName(), configElement.getAttribute(ATTRIBUTE_UML_FILE), configElement.getAttribute(ATTRIBUTE_NOTATION_FILE),
- configElement.getAttribute(ATTRIBUTE_DI_FILE));
- template.setLanguage(configElement.getAttribute(ATTRIBUTE_LANGUAGE));
- templates.add(template);
- }
- return templates;
- }
+public class ModelTemplatesContentProvider extends AbstractModelTemplateContentProvider {
+ // This class is used to populate SelectModelTemplateComposite's singleTemplateCombo
/**
* Gets the elements.
@@ -107,16 +30,22 @@ public class ModelTemplatesContentProvider implements IStructuredContentProvider
* @return the elements
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
*/
+ @Override
public Object[] getElements(Object inputElement) {
+ // InputElement is the value of the selected language (radio button) from the SelectDiagramCategoryPage, e.g. "uml"
if (inputElement instanceof Object[]) {
List<ModelTemplateDescription> result = new ArrayList<ModelTemplateDescription>();
for (Object next : (Object[]) inputElement) {
if (next instanceof String) {
+ // Therefore diagramCategory is of the same type
String diagramCategory = (String) next;
for (ModelTemplateDescription template : getTemplatesDescription()) {
- if (diagramCategory == null || diagramCategory.equals(template.getLanguage())) {
+ // For the QVT transformation, a link to the transformation model was given to the element and therefore it had the corresponding transfoURI
+ // The models Templates do not have this information and that was how they were sorted in the tableViewer/comboBox
+ // if ((diagramCategory == null || diagramCategory.equals(template.getLanguage())) && template.getTransfoURI() == null) {
+ if ((diagramCategory == null || diagramCategory.equals(template.getLanguage())) && template.getDi_path() != null) {
result.add(template);
}
}
@@ -128,21 +57,4 @@ public class ModelTemplatesContentProvider implements IStructuredContentProvider
return new Object[0];
}
- /**
- * Input changed.
- *
- * @param viewer
- * the viewer
- * @param oldInput
- * the old input
- * @param newInput
- * the new input
- * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (viewer instanceof TableViewer) {
- ((TableViewer) viewer).add(getElements(null));
- }
- }
-
-} \ No newline at end of file
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesLabelProvider.java
index 6354c3f6d6f..23398877b7a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesLabelProvider.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/ModelTemplatesLabelProvider.java
@@ -15,7 +15,7 @@ package org.eclipse.papyrus.uml.diagram.wizards.template;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.swt.graphics.Image;
/**
@@ -48,9 +48,9 @@ public class ModelTemplatesLabelProvider implements ITableLabelProvider {
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
*/
public String getColumnText(Object element, int columnIndex) {
- if (element instanceof ModelTemplateDescription) {
- ModelTemplateDescription modelTemplate = (ModelTemplateDescription) element;
- return NLS.bind(org.eclipse.papyrus.uml.diagram.wizards.Messages.ModelTemplatesLabelProvider_model_template_description_text, modelTemplate.getName(), modelTemplate.getFileName());
+ if(element instanceof ModelTemplateDescription) {
+ ModelTemplateDescription modelTemplate = (ModelTemplateDescription)element;
+ return Messages.bind(org.eclipse.papyrus.uml.diagram.wizards.messages.Messages.ModelTemplatesLabelProvider_model_template_description_text, modelTemplate.getName(), modelTemplate.getFileName());
}
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/SelectModelTemplateComposite.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/SelectModelTemplateComposite.java
index 3f950eb0317..aa18dedfecc 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/SelectModelTemplateComposite.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/template/SelectModelTemplateComposite.java
@@ -13,7 +13,15 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.wizards.template;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -24,10 +32,12 @@ import org.eclipse.swt.widgets.Composite;
*/
public class SelectModelTemplateComposite extends Composite {
-
- /** The template table viewer. */
private CheckboxTableViewer templateTableViewer;
+ private ComboViewer singleTemplateCombo;
+
+ private ModelTemplateDescription selectedTemplate;
+
/**
* Instantiates a new select model template composite.
*
@@ -36,11 +46,9 @@ public class SelectModelTemplateComposite extends Composite {
*/
public SelectModelTemplateComposite(Composite parent) {
super(parent, SWT.NONE);
+ this.setLayout(new GridLayout());
+ this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- GridLayout layout = new GridLayout();
- layout.marginWidth = layout.marginHeight = 0;
- setLayout(layout);
createTemplatesViewer(this);
}
@@ -48,7 +56,9 @@ public class SelectModelTemplateComposite extends Composite {
* Disable.
*/
public void disable() {
- templateTableViewer.getTable().setEnabled(false);
+ if (templateTableViewer != null) {
+ templateTableViewer.getTable().setEnabled(false);
+ }
}
/**
@@ -58,17 +68,51 @@ public class SelectModelTemplateComposite extends Composite {
* the composite
*/
private void createTemplatesViewer(Composite composite) {
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- templateTableViewer = CheckboxTableViewer.newCheckList(composite, SWT.NO_BACKGROUND);
- templateTableViewer.getTable().setBackground(composite.getBackground());
- templateTableViewer.getTable().setLayoutData(data);
- templateTableViewer.getTable().setEnabled(true);
- templateTableViewer.setContentProvider(new ModelTemplatesContentProvider());
+ singleTemplateCombo = new ComboViewer(composite, SWT.READ_ONLY);
+ singleTemplateCombo.getControl().setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ singleTemplateCombo.setContentProvider(new ModelTemplatesContentProvider());
+ singleTemplateCombo.setLabelProvider(new LabelProvider() {
+
+ /**
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ *
+ * @param element
+ * @return
+ */
+
+ @Override
+ public String getText(Object element) {
+ if (element instanceof ModelTemplateDescription) {
+ ModelTemplateDescription currentTemplate = (ModelTemplateDescription) element;
+ return currentTemplate.getName();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+
+ });
+
+ singleTemplateCombo.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ StructuredSelection template = (StructuredSelection) event.getSelection();
+ selectedTemplate = (ModelTemplateDescription) template.getFirstElement();
+ }
+ });
+
+ templateTableViewer = CheckboxTableViewer.newCheckList(composite, SWT.V_SCROLL);
+ GridData gridTable = new GridData(SWT.FILL, SWT.TOP, true, false);
+ templateTableViewer.getTable().setLayoutData(gridTable);
+ templateTableViewer.getTable().setBackground(composite.getBackground());
+ templateTableViewer.setContentProvider(new ModelTemplateTransfoProvider());
templateTableViewer.setLabelProvider(new ModelTemplatesLabelProvider());
- templateTableViewer.getControl().setEnabled(true);
+ // Sets a minimum height for the tableViewer
+ // gridTable.minimumHeight = templateTableViewer.getTable().getItemHeight() * 2;
+ // Sets an arbitrary height for the tableViewer
+ gridTable.heightHint = templateTableViewer.getTable().getItemHeight() * 2;
- templateTableViewer.getTable().setLayout(new GridLayout());
}
/**
@@ -77,9 +121,8 @@ public class SelectModelTemplateComposite extends Composite {
* @return the uml model template path
*/
public String getTemplatePath() {
- Object[] selected = templateTableViewer.getCheckedElements();
- if (selected.length > 0) {
- return ((ModelTemplateDescription) selected[0]).getUml_path();
+ if (selectedTemplate != null) {
+ return selectedTemplate.getUml_path();
}
return null;
}
@@ -90,9 +133,8 @@ public class SelectModelTemplateComposite extends Composite {
* @return the di file template path
*/
public String getDiTemplatePath() {
- Object[] selected = templateTableViewer.getCheckedElements();
- if (selected.length > 0) {
- return ((ModelTemplateDescription) selected[0]).getDi_path();
+ if (selectedTemplate != null) {
+ return selectedTemplate.getDi_path();
}
return null;
}
@@ -103,9 +145,8 @@ public class SelectModelTemplateComposite extends Composite {
* @return the notation template path
*/
public String getNotationTemplatePath() {
- Object[] selected = templateTableViewer.getCheckedElements();
- if (selected.length > 0) {
- return ((ModelTemplateDescription) selected[0]).getNotation_path();
+ if (selectedTemplate != null) {
+ return selectedTemplate.getNotation_path();
}
return null;
}
@@ -116,9 +157,8 @@ public class SelectModelTemplateComposite extends Composite {
* @return the template plugin id
*/
public String getTemplatePluginId() {
- Object[] selected = templateTableViewer.getCheckedElements();
- if (selected.length > 0) {
- return ((ModelTemplateDescription) selected[0]).getPluginId();
+ if (selectedTemplate != null) {
+ return selectedTemplate.getPluginId();
}
return null;
}
@@ -130,7 +170,9 @@ public class SelectModelTemplateComposite extends Composite {
* the to select
*/
public void selectElement(Object toSelect) {
- templateTableViewer.setCheckedElements(new Object[] { toSelect });
+ if (templateTableViewer != null) {
+ templateTableViewer.setCheckedElements(new Object[] { toSelect });
+ }
}
/**
@@ -139,7 +181,68 @@ public class SelectModelTemplateComposite extends Composite {
* @return the content provider
*/
public ModelTemplatesContentProvider getContentProvider() {
- return (ModelTemplatesContentProvider) templateTableViewer.getContentProvider();
+ if (templateTableViewer != null) {
+ return (ModelTemplatesContentProvider) templateTableViewer.getContentProvider();
+ }
+ return null;
+ }
+
+
+ public List<ModelTemplateDescription> getTemplateTransfoPath() {
+ if (templateTableViewer != null) {
+ Object[] selection = templateTableViewer.getCheckedElements();
+ if (selection.length <= 1) {
+ List<ModelTemplateDescription> templatePath = new ArrayList<ModelTemplateDescription>();
+ for (Object currentObject : selection) {
+ templatePath.add((ModelTemplateDescription) currentObject);
+ }
+ return templatePath;
+ }
+ }
+ return null;
+ }
+
+
+ public List<String> getDiTemplateTransfoPath() {
+ if (templateTableViewer != null) {
+ Object[] selection = templateTableViewer.getCheckedElements();
+ if (selection.length <= 1) {
+ List<String> templatePath = new ArrayList<String>();
+ for (Object currentObject : selection) {
+ templatePath.add(((ModelTemplateDescription) currentObject).getDi_path());
+ }
+ return templatePath;
+ }
+ }
+ return null;
+ }
+
+ public List<String> getNotationTemplateTransfoPath() {
+ if (templateTableViewer != null) {
+ Object[] selection = templateTableViewer.getCheckedElements();
+ if (selection.length <= 1) {
+ List<String> templatePath = new ArrayList<String>();
+ for (Object currentObject : selection) {
+ templatePath.add(((ModelTemplateDescription) currentObject).getNotation_path());
+ }
+ return templatePath;
+ }
+ }
+ return null;
+ }
+
+ public List<String> getTemplateTransfoPluginID() {
+ if (templateTableViewer != null) {
+ Object[] selection = templateTableViewer.getCheckedElements();
+ if (selection.length <= 1) {
+ List<String> templatePath = new ArrayList<String>();
+ for (Object currentObject : selection) {
+ templatePath.add(((ModelTemplateDescription) currentObject).getPluginId());
+ }
+ return templatePath;
+ }
+ }
+ return null;
}
/**
@@ -149,7 +252,11 @@ public class SelectModelTemplateComposite extends Composite {
* the new input
*/
public void setInput(Object input) {
- templateTableViewer.setInput(input);
+ if (templateTableViewer != null) {
+ templateTableViewer.setInput(input);
+ }
+ singleTemplateCombo.setInput(input);
}
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/IGenerator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/IGenerator.java
new file mode 100644
index 00000000000..cb65297ec44
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/IGenerator.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.transformation;
+
+
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+
+/**
+ * Generic generator
+ *
+ */
+public interface IGenerator {
+
+ public void execute();
+
+ public void setModelSet(ModelSet modelSet);
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/QVToGenerator.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/QVToGenerator.java
new file mode 100644
index 00000000000..8fd7292b935
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/transformation/QVToGenerator.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.transformation;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.BasicDiagnostic;
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.m2m.qvt.oml.BasicModelExtent;
+import org.eclipse.m2m.qvt.oml.ExecutionContextImpl;
+import org.eclipse.m2m.qvt.oml.ExecutionDiagnostic;
+import org.eclipse.m2m.qvt.oml.ModelExtent;
+import org.eclipse.m2m.qvt.oml.TransformationExecutor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.diagram.wizards.command.CopyModelCommand;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+
+
+public class QVToGenerator implements IGenerator {
+
+ protected ModelSet modelSet;
+
+ protected String templateURI;
+
+ protected String pluginID;
+
+ // This map is to cache the executors so as to not have to calculate them every time they are needed
+ protected static Map<URI, TransformationExecutor> executorMap = new HashMap<URI, TransformationExecutor>();
+
+ protected TransformationExecutor executor;
+
+ protected URI transformationURI;
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator#execute()
+ *
+ */
+
+ @Override
+ public void execute() {
+
+ setExecutor();
+ // The TransformationExecutor was not properly set
+ if (executor == null) {
+ return;
+ }
+
+ ExecutionContextImpl context = new ExecutionContextImpl();
+ Resource inResource = UmlUtils.getUmlModel(getOutputModelSet()).getResource();
+ EList<EObject> inObjects = inResource.getContents();
+ Resource inResourceTemplate = loadTemplateResource();
+ EList<EObject> inObjectTemplates = inResourceTemplate.getContents();
+ ModelExtent input = new BasicModelExtent(inObjects);
+ ModelExtent inputTemplate = new BasicModelExtent(inObjectTemplates);
+ context.setConfigProperty("keepModeling", true); //$NON-NLS-1$
+ ExecutionDiagnostic result = executor.execute(context, inputTemplate, input);
+ if (result.getSeverity() == Diagnostic.OK) {
+ List<EObject> outObjects = input.getContents();
+ getCommandStack(getOutputModelSet()).execute(new CopyModelCommand(getOutputModelSet().getTransactionalEditingDomain(),
+ inResource, outObjects));
+ try {
+ inResource.save(Collections.emptyMap());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else {
+ IStatus status = BasicDiagnostic.toIStatus(result);
+ org.eclipse.papyrus.uml.diagram.wizards.Activator.getDefault().getLog().log(status);
+ }
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator#setTemplateModel(java.util.List)
+ *
+ * @param targetURI
+ */
+ public void setTemplateModel(String templateURI) {
+ this.templateURI = templateURI;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator#getOutputURI()
+ *
+ * @return
+ */
+
+ public ModelSet getOutputModelSet() {
+ return this.modelSet;
+ }
+
+
+ @Override
+ public void setModelSet(ModelSet modelSet) {
+ this.modelSet = modelSet;
+ }
+
+
+ public void setPluginId(String pluginId) {
+
+ this.pluginID = pluginId;
+ }
+
+ private Resource loadTemplateResource() {
+ java.net.URL templateURL = Platform.getBundle(pluginID).getResource(templateURI);
+ if (templateURL != null) {
+ String fullUri = templateURL.getPath();
+ URI uri = URI.createPlatformPluginURI(pluginID + fullUri, true);
+ Resource resource = modelSet.getResource(uri, true);
+ if (resource.isLoaded()) {
+ return resource;
+ }
+ }
+ return null;
+ }
+
+ protected final CommandStack getCommandStack(ModelSet modelSet) {
+ return modelSet.getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public void setTransformationURI(URI transformationURI) {
+ this.transformationURI = transformationURI;
+ }
+
+ public void setExecutor() {
+ TransformationExecutor executor = executorMap.get(transformationURI);
+ if (executor == null) {
+ executor = new TransformationExecutor(transformationURI);
+ executorMap.put(transformationURI, executor);
+ }
+
+ this.executor = executor;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/SettingsHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/SettingsHelper.java
index 8e0235ce6e6..460527a7557 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/SettingsHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/SettingsHelper.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
+ * Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,10 +7,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Tatiana Fesenko (CEA LIST) - Initial API and implementation
- *
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
*****************************************************************************/
-package org.eclipse.papyrus.uml.diagram.wizards;
+
+package org.eclipse.papyrus.uml.diagram.wizards.utils;
import java.util.ArrayList;
import java.util.Collections;
@@ -20,9 +19,7 @@ import java.util.StringTokenizer;
import org.eclipse.jface.dialogs.IDialogSettings;
-/**
- * The Class SettingsUtils allows the Wizard to remember last selected diagram kinds and categories.
- */
+
public class SettingsHelper {
/** The Constant DIAGRAM_KIND_SEPARATOR. */
@@ -69,7 +66,7 @@ public class SettingsHelper {
* Save default diagram category.
*
* @param categories
- * the categories
+ * the categories
*/
public void saveDefaultDiagramCategory(String[] categories) {
mySettings.put(LAST_SELECTED_CATEGORY, categories);
@@ -84,7 +81,7 @@ public class SettingsHelper {
*/
public List<String> getDefaultDiagramKinds(String category) {
String csl = mySettings.get(getKeyForDiagramKind(category));
- if (csl == null || csl == "") { //$NON-NLS-1$
+ if(csl == null || csl.equals("")) { //$NON-NLS-1$
return Collections.emptyList();
}
List<String> result = new ArrayList<String>();
@@ -121,7 +118,7 @@ public class SettingsHelper {
*/
public List<String> getDefaultTemplates(String category) {
String csl = mySettings.get(getKeyForTemplate(category));
- if (csl == null || csl == "") { //$NON-NLS-1$
+ if(csl == null || csl.equals("")) { //$NON-NLS-1$
return Collections.emptyList();
}
List<String> result = new ArrayList<String>();
@@ -174,7 +171,7 @@ public class SettingsHelper {
* Gets the key for diagram kind.
*
* @param category
- * the category
+ * the category
* @return the key for diagram kind
*/
private String getKeyForDiagramKind(String category) {
@@ -185,7 +182,7 @@ public class SettingsHelper {
* Gets the key for template.
*
* @param category
- * the category
+ * the category
* @return the key for template
*/
private String getKeyForTemplate(String category) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/WizardsHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/WizardsHelper.java
index 55b2623395b..13a420dc854 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/WizardsHelper.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/utils/WizardsHelper.java
@@ -104,4 +104,12 @@ public class WizardsHelper {
}
return null;
}
+
+ public static String[] getListExcludedTemplate(String stringTemplate) {
+ if(stringTemplate != null) {
+ String[] arrayTemplate = stringTemplate.split("/"); //$NON-NLS-1$
+ return arrayTemplate;
+ }
+ return null;
+ }
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/ExtensionFilter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/ExtensionFilter.java
new file mode 100644
index 00000000000..947d9bc24f7
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/ExtensionFilter.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.wizards.widget;
+
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+
+/**
+ * A filter for file extensions
+ *
+ * @author Camille Letavernier
+ */
+public class ExtensionFilter extends ViewerFilter {
+
+ private Set<String> extensions;
+
+ /**
+ *
+ * Constructs a ViewerFilter that will only accept filenames with one of the
+ * given extensions
+ *
+ * @param extensions
+ * The authorized extensions
+ */
+ public ExtensionFilter(String[] extensions) {
+ this.extensions = new HashSet<String>(Arrays.asList(extensions));
+ }
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if(element instanceof IFile) {
+ IFile file = (IFile)element;
+ for(String ext : extensions) {
+ if(file.getFullPath().toString().endsWith(ext)) {
+ return true;
+ }
+ }
+ } else if(element instanceof IProject || element instanceof IFolder) {
+ return true;
+ }
+
+ return false;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/FileChooser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/FileChooser.java
new file mode 100644
index 00000000000..2748c83b425
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/widget/FileChooser.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * Copyright (c) 2010 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.widget;
+
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * A Widget for selecting or creating a file in the workspace
+ *
+ * @author Camille Letavernier
+ */
+public class FileChooser extends Composite implements SelectionListener, Listener {
+
+ private Text text;
+
+ private Button browse;
+
+ private IFile currentFile;
+
+ private List<ViewerFilter> filters;
+
+ private Set<Listener> listeners = new HashSet<Listener>();
+
+ private boolean newFile;
+
+ /**
+ * Constructs a new FileChooser in the given Composite
+ *
+ * @param parent
+ * The composite in which the FileChooser is created
+ * @param newFile
+ * True if the fileChooser allows the user to create a new file,
+ * false if he should select an existing one
+ */
+ public FileChooser(Composite parent, boolean newFile) {
+ super(parent, SWT.NONE);
+ setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ GridLayout layout = new GridLayout(2, false);
+ layout.marginWidth = 0;
+ setLayout(layout);
+
+ text = new Text(this, SWT.BORDER);
+ text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ text.addListener(SWT.FocusOut, this);
+ browse = new Button(this, SWT.PUSH);
+ browse.addSelectionListener(this);
+ browse.setText(Messages.FileChooser_0);
+ filters = new LinkedList<ViewerFilter>();
+ this.newFile = newFile;
+ }
+
+ /**
+ * @return the selected file path
+ */
+ public String getFilePath() {
+ if (text.isDisposed()) {
+ return null;
+ }
+ String path = text.getText();
+ if (path.trim().equals("")) { //$NON-NLS-1$
+ return null;
+ }
+ return path.trim();
+ }
+
+ /**
+ * Sets the file extensions that this FileChooser accepts
+ * Files that don't match one of these extensions will be hidden
+ *
+ * @param extensions
+ */
+ public void setFilterExtensions(String[] extensions) {
+ filters.clear();
+ ExtensionFilter filter = new ExtensionFilter(extensions);
+ filters.add(filter);
+ }
+
+ @Override
+ public void handleEvent(Event event) {
+ notifyChange();
+ }
+
+ /**
+ * Add a listener to this widget. The listener will be notified when the user
+ * choose a new file
+ *
+ * @param listener
+ */
+ public void addListener(Listener listener) {
+ listeners.add(listener);
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IFile[] result = new IFile[0];
+
+ if (newFile) {
+ IFile file = WorkspaceResourceDialog.openNewFile(getShell(), null, null, null, filters);
+ if (file != null) {
+ result = new IFile[] { file };
+ }
+ } else {
+ result = WorkspaceResourceDialog.openFileSelection(getShell(), null, null, false, new Object[] { currentFile }, filters);
+ }
+
+ if (result.length >= 1) {
+ currentFile = result[0];
+ text.setText(currentFile.getFullPath().toString());
+ notifyChange();
+ }
+ }
+
+ private void notifyChange() {
+ for (Listener listener : listeners) {
+ listener.handleEvent(null);
+ }
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // Nothing
+ }
+
+ public void setText(String s) {
+ text.setText(s);
+
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateModelWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateModelWizard.java
new file mode 100644
index 00000000000..82a9caf7d75
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateModelWizard.java
@@ -0,0 +1,943 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2013 Obeo, 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:
+ * Obeo - initial API and implementation
+ * Tatiana Fesenko(CEA) - [313179] Refactor CreateModelWizard
+ * Saadia Dhouib (CEA LIST) - Implementation of loading diagrams from template files (.uml, .di , .notation)
+ * Christian W. Damus (CEA) - create models by URI, not IFile (CDO)
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *******************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import static org.eclipse.papyrus.uml.diagram.wizards.Activator.log;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.ui.URIEditorInput;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+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.transaction.RecordingCommand;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.core.editor.BackboneException;
+import org.eclipse.papyrus.infra.core.extension.commands.IModelCreationCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModelUtils;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryDescriptor;
+import org.eclipse.papyrus.uml.diagram.wizards.category.DiagramCategoryRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.command.InitFromTemplateCommand;
+import org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage.CategoryProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.INewModelStorageProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.NewModelStorageProviderRegistry;
+import org.eclipse.papyrus.uml.diagram.wizards.providers.WorkspaceNewModelStorageProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.template.ModelTemplateDescription;
+import org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator;
+import org.eclipse.papyrus.uml.diagram.wizards.transformation.QVToGenerator;
+import org.eclipse.papyrus.uml.tools.commands.ApplyProfileCommand;
+import org.eclipse.papyrus.uml.tools.commands.RenameElementCommand;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IURIEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.services.IEvaluationService;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * Create new model file and initialize a selected diagram. This wizard create
+ * several files :
+ * <li>*.di : the DI file to store Di diagrams and references all external diagrams like GMF diagrams.</li>
+ * <li>*.notation : the file to store pure GMF diagrams</li>
+ * <li>*.uml : the standard UML file to store UML semantics elements. (Model,
+ * Package, Class,...)</li>
+ *
+ * Those files can be used with the PapyrusEditor (see plugin.xml).
+ */
+public class CreateModelWizard extends Wizard implements INewWizard {
+
+ /** The Constant WIZARD_ID. */
+ public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.createmodel"; //$NON-NLS-1$
+
+ /** The Constant NEW_MODEL_SETTINGS. */
+ public static final String NEW_MODEL_SETTINGS = "NewModelWizard"; //$NON-NLS-1$
+
+ private SelectStorageProviderPage selectStorageProviderPage;
+
+ /** Select kind of new diagram the wizard must create. */
+ private SelectDiagramKindPage selectDiagramKindPage;
+
+ /** The select diagram category page. */
+ protected SelectDiagramCategoryPage selectDiagramCategoryPage;
+
+ /** Current workbench. */
+ private IWorkbench workbench;
+
+ private NewModelStorageProviderRegistry storageProviderRegistry;
+
+ private INewModelStorageProvider selectedStorageProvider;
+
+ private Map<INewModelStorageProvider, List<IWizardPage>> providerPages = new java.util.HashMap<INewModelStorageProvider, List<IWizardPage>>();
+
+ private Map<IWizardPage, INewModelStorageProvider> providersByPage = new java.util.HashMap<IWizardPage, INewModelStorageProvider>();
+
+ private int startProviderPageIndex; // index of last page before provider pages
+
+ private int endProviderPageIndex; // index of first page after provider pages
+
+ protected IWizardPage newProjectPage;
+
+ protected static final String EXTENSION_POINT_ID = "org.eclipse.papyrus.uml.diagram.wizards.templates"; //$NON-NLS-1$
+
+ /**
+ * Instantiates a new creates the model wizard.
+ */
+ public CreateModelWizard() {
+ super();
+ setWindowTitle(Messages.CreateModelWizard_new_papyrus_model_title);
+ // setHelpAvailable(true);
+
+ }
+
+ /**
+ * Adds the pages.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void addPages() {
+ // ModelCreation: the selectDiagramCategoryPage exists
+ if (selectedStorageProvider.getDiagramCategoryPage() == null) {
+ addPageIfNotNull(selectDiagramCategoryPage);
+ } else {
+ addPageIfNotNull(selectedStorageProvider.getDiagramCategoryPage());
+ }
+
+ // The selectStorageProviderPage is only set if a model is created, cf initStorageProvider(IWorkbench, IStructuredSelection)
+ // The storage page for a project, newProjectPage, is handled by the PapyrusProjectCreationPage
+ addPageIfNotNull(selectStorageProviderPage);
+ addPageIfNotNull(newProjectPage);
+
+ startProviderPageIndex = getPageCount() - 1;
+ for (INewModelStorageProvider next : getStorageProviders()) {
+ List<IWizardPage> pageList = new java.util.ArrayList<IWizardPage>(3);
+ for (IWizardPage page : next.createPages()) {
+ if (page != null) {
+ pageList.add(page);
+ providersByPage.put(page, next);
+ if (!page.equals(selectedStorageProvider.getDiagramCategoryPage())) {
+ addPage(page);
+ }
+ }
+ }
+ providerPages.put(next, pageList);
+ }
+ endProviderPageIndex = getPageCount();
+
+ addPageIfNotNull(selectDiagramKindPage);
+ }
+
+ protected void setNewProjectPage(IWizardPage page) {
+ this.newProjectPage = page;
+ }
+
+ /**
+ * Adds the page if not null.
+ *
+ * @param page
+ * the page
+ */
+ protected final void addPageIfNotNull(IWizardPage page) {
+ if (page != null) {
+ addPage(page);
+ }
+ }
+
+ public boolean isInitModelWizard() {
+ return false;
+ }
+
+ public boolean isCreateProjectWizard() {
+ return false;
+ }
+
+ public boolean isCreateMultipleModelsWizard() {
+ return false;
+ }
+
+ /**
+ * Inits the.
+ *
+ * @param workbench
+ * the workbench
+ * @param selection
+ * the selection {@inheritDoc}
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+
+ initStorageProvider(workbench, selection);
+
+ IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
+ IDialogSettings section = workbenchSettings.getSection(NEW_MODEL_SETTINGS);
+ if (section == null) {
+ section = workbenchSettings.addNewSection(NEW_MODEL_SETTINGS);
+ }
+ setDialogSettings(section);
+
+ selectStorageProviderPage = createSelectStorageProviderPage();
+
+ for (INewModelStorageProvider next : getStorageProviders()) {
+ next.init(this, selection);
+ }
+
+ selectDiagramKindPage = createSelectDiagramKindPage();
+ }
+
+ /**
+ * Perform finish.
+ *
+ * @return true, if successful {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ String[] diagramCategoryIds = getDiagramCategoryIds();
+ if (diagramCategoryIds.length == 0) {
+ return false;
+ }
+ String diagramCategoryId = diagramCategoryIds[0];
+ final URI newURI = createNewModelURI(diagramCategoryId);
+
+ createAndOpenPapyrusModel(newURI, diagramCategoryId);
+
+
+ return true;
+ }
+
+ protected URI createNewModelURI(String diagramCategoryID) {
+ return getSelectedStorageProvider().createNewModelURI(diagramCategoryID);
+ }
+
+ /**
+ * Creates the and open papyrus model.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ * @param diagramCategoryId
+ * the diagram category id
+ * @return true, if successful
+ */
+ protected boolean createAndOpenPapyrusModel(URI newURI, String diagramCategoryId) {
+
+ if (newURI == null) {
+ return false;
+ }
+
+ ServicesRegistry registry = createServicesRegistry();
+ if (registry == null) {
+ return false;
+ }
+
+ try {
+ // have to create the model set and populate it with the DI model
+ // before initializing other services that actually need the DI
+ // model, such as the SashModel Manager service
+ ModelSet modelSet = registry.getService(ModelSet.class);
+
+ createPapyrusModels(modelSet, newURI);
+
+ initServicesRegistry(registry);
+
+ initDomainModel(modelSet, newURI, diagramCategoryId);
+
+ initDiagramModel(modelSet, diagramCategoryId);
+
+
+
+ initProfile(modelSet);
+ initTemplate(modelSet);
+ openDiagram(newURI);
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ return false;
+ } finally {
+ try {
+ registry.disposeRegistry();
+ } catch (ServiceException ex) {
+ // Ignore
+ }
+ }
+
+ return true;
+ }
+
+ private void initProfile(ModelSet modelSet) {
+ boolean isProfileApplied = selectDiagramKindPage.getProfileURI() != null;
+ if (isProfileApplied) {
+ applyProfile(modelSet);
+ saveDiagram(modelSet);
+
+ }
+
+ }
+
+ private void initTemplate(ModelSet modelSet) {
+ boolean isToInitFromTemplateTransfo = selectDiagramKindPage.getTemplateTransfo().size() > 0;
+ if (isToInitFromTemplateTransfo) {
+ applyTemplateTransfo(modelSet);
+ }
+ }
+
+ protected ServicesRegistry createServicesRegistry() {
+ ServicesRegistry result = null;
+
+ try {
+ result = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ } catch (ServiceException e) {
+ // couldn't create the registry? Fatal problem
+ Activator.log.error(e);
+ }
+
+ try {
+ // have to create the model set and populate it with the DI model
+ // before initializing other services that actually need the DI
+ // model, such as the SashModel Manager service
+ result.startServicesByClassKeys(ModelSet.class);
+ } catch (ServiceException ex) {
+ // Ignore this exception: some services may not have been loaded,
+ // which is probably normal at this point
+ }
+
+ return result;
+ }
+
+ protected void initServicesRegistry(ServicesRegistry registry) throws ServiceException {
+ try {
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore this exception: some services may not have been loaded,
+ // which is probably normal at this point
+ }
+
+ registry.getService(IPageManager.class);
+ }
+
+ /**
+ * Gets the diagram category ids.
+ *
+ * @return the diagram category ids
+ */
+ protected String[] getDiagramCategoryIds() {
+ if (selectDiagramCategoryPage != null) {
+ return selectDiagramCategoryPage.getDiagramCategories();
+ }
+ if (selectedStorageProvider.getDiagramCategoryPage() != null) {
+ return selectedStorageProvider.getDiagramCategoryPage().getDiagramCategories();
+ }
+ return null;
+ }
+
+ /**
+ * Gets the diagram file extension.
+ *
+ * @param diagramCategoryId
+ * the diagram category id
+ * @return the diagram file extension
+ */
+ public String getDiagramFileExtension(String diagramCategoryId) {
+ return getDiagramFileExtension(diagramCategoryId, NewModelFilePage.DEFAULT_DIAGRAM_EXTENSION);
+ }
+
+ /**
+ * Gets the diagram file extension.
+ *
+ * @param categoryId
+ * the category id
+ * @param defaultExtension
+ * the default extension
+ * @return the diagram file extension
+ */
+ public String getDiagramFileExtension(String categoryId, String defaultExtension) {
+ DiagramCategoryDescriptor diagramCategory = getDiagramCategoryMap().get(categoryId);
+ String extensionPrefix = diagramCategory != null ? diagramCategory.getExtensionPrefix() : null;
+ return (extensionPrefix != null) ? extensionPrefix + "." + defaultExtension : defaultExtension; //$NON-NLS-1$
+ }
+
+ /**
+ * Creates the select diagram category page.
+ *
+ * @return the select diagram category page
+ */
+ protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
+ return new SelectDiagramCategoryPage();
+ }
+
+ /**
+ * Creates the select diagram kind page.
+ *
+ * @return the select diagram kind page
+ */
+ protected SelectDiagramKindPage createSelectDiagramKindPage() {
+ return new SelectDiagramKindPage(new CategoryProvider() {
+
+ @Override
+ public String[] getCurrentCategories() {
+ return getDiagramCategoryIds();
+ }
+
+ });
+ }
+
+ /**
+ * Inits the domain model.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ * @param diagramCategoryId
+ * the diagram category id
+ */
+ protected void initDomainModel(ModelSet modelSet, final URI newURI, String diagramCategoryId) {
+
+ boolean isToInitFromTemplate = selectDiagramKindPage.getTemplatePath() != null;
+ if (isToInitFromTemplate) {
+ initDomainModelFromTemplate(modelSet);
+ } else {
+ createEmptyDomainModel(modelSet, diagramCategoryId);
+ }
+ }
+
+ protected void applyProfile(ModelSet modelSet) {
+ Resource myModelUMLResource = UmlUtils.getUmlResource(modelSet);
+ Model model = (Model) myModelUMLResource.getContents().get(0);
+ String profilePath = selectDiagramKindPage.getProfileURI();
+ ResourceSet resourceSet = new ResourceSetImpl();
+ Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(profilePath, true), true);
+ Profile profile = (Profile) resource.getContents().get(0);
+ getCommandStack(modelSet).execute(new ApplyProfileCommand(model, profile, modelSet.getTransactionalEditingDomain()));
+
+
+ }
+
+ protected void applyTemplateTransfo(ModelSet modelSet) {
+ List<ModelTemplateDescription> templateList = selectDiagramKindPage.getTemplateTransfo();
+ // // This is an example of the use of QVT Transformations
+ // QVToGenerator generator = new QVToGenerator();
+ //
+ // for (final ModelTemplateDescription currentTemplate : templateList) {
+ // // fetches the tranformation URI encoded in the extension point, if it has that attribute
+ // // generator.setTransformationURI(URI.createPlatformPluginURI("org.eclipse.papyrus.uml.diagram.wizards/transforms/UMLCopyTemplateTransfo.qvto", true));//$NON-NLS-1$
+ // generator.setTransformationURI(URI.createPlatformPluginURI(currentTemplate.getTransfoURI(), true));
+ // generator.setModelSet(modelSet);
+ // generator.setTemplateModel(currentTemplate.getUml_path());
+ // generator.setPluginId(currentTemplate.getPluginId());
+ // generator.execute();
+ // }
+
+ // This is an example of transformations without using the QVToGenerator
+ // TODO make it prettier
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ // get all the extensions configured into the extension point corresponding to the 'templates' Point ID from the 'org.eclipse.papyrus.uml.diagram.wizards' plugin
+ IExtension[] extensions = registry.getExtensionPoint(EXTENSION_POINT_ID).getExtensions();
+
+ for (IExtension extension : extensions) {
+ for (IConfigurationElement configElement : extension.getConfigurationElements()) {
+ if ("template".equals(configElement.getName())) { //$NON-NLS-1$
+ // not handled here
+ } else if ("transformation".equals(configElement.getName())) { //$NON-NLS-1$
+ for (ModelTemplateDescription currentTemplate : templateList) {
+ if (currentTemplate.getName().equals(configElement.getAttribute("name"))) { //$NON-NLS-1$
+ IGenerator iGenerator;
+ try {
+ iGenerator = (IGenerator) configElement.createExecutableExtension("Transformation"); //$NON-NLS-1$
+ iGenerator.setModelSet(modelSet);
+ iGenerator.execute();
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ }
+ }
+ }
+
+ }
+ }
+ }
+
+ }
+
+ /**
+ * Inits the domain model from template.
+ *
+ * @param modelSet
+ * the di resource set
+ */
+ protected void initDomainModelFromTemplate(ModelSet modelSet) {
+ getCommandStack(modelSet).execute(
+ new InitFromTemplateCommand(modelSet.getTransactionalEditingDomain(), modelSet, selectDiagramKindPage.getTemplatePluginId(), selectDiagramKindPage.getTemplatePath(), selectDiagramKindPage.getNotationTemplatePath(), selectDiagramKindPage
+ .getDiTemplatePath()));
+ }
+
+ /**
+ * Creates the empty domain model.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param diagramCategoryId
+ * the diagram category id
+ */
+ protected void createEmptyDomainModel(ModelSet modelSet, String diagramCategoryId) {
+ try {
+ IModelCreationCommand creationCommand = getDiagramCategoryMap().get(diagramCategoryId).getCommand();
+ creationCommand.createModel(modelSet);
+ } catch (BackboneException e) {
+ log.error(e);
+ }
+ }
+
+ /**
+ * Creates the papyrus models.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ */
+ protected void createPapyrusModels(ModelSet modelSet, URI newURI) {
+ RecordingCommand command = new NewPapyrusModelCommand(modelSet, newURI);
+ getCommandStack(modelSet).execute(command);
+ }
+
+
+ /**
+ * Open diagram.
+ *
+ * @param newURI
+ * the URI of the new model's principal resource
+ */
+ protected void openDiagram(final URI newURI) {
+ IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ if (page != null) {
+ try {
+ IEditorInput editorInput = createEditorInput(newURI);
+ IDE.openEditor(page, editorInput, getPreferredEditorID(editorInput), true);
+ } catch (PartInitException e) {
+ log.error(e);
+ }
+ }
+ }
+
+ protected IEditorInput createEditorInput(URI uri) {
+ return getSelectedStorageProvider().createEditorInput(uri);
+ }
+
+ protected String getPreferredEditorID(IEditorInput input) throws PartInitException {
+ IEditorDescriptor desc;
+
+ if (input instanceof IFileEditorInput) {
+ desc = IDE.getEditorDescriptor(((IFileEditorInput) input).getFile());
+ } else {
+ // try to get a URI
+ URI uri = null;
+ if (input instanceof IURIEditorInput) {
+ uri = URI.createURI(((IURIEditorInput) input).getURI().toString(), true);
+ } else if (input instanceof URIEditorInput) {
+ uri = ((URIEditorInput) input).getURI();
+ }
+
+ if (uri != null) {
+ desc = IDE.getEditorDescriptor(uri.lastSegment());
+ } else {
+ // hope that the input name is the file name
+ desc = IDE.getEditorDescriptor(input.getName());
+ }
+ }
+
+ return (desc == null) ? "org.eclipse.papyrus.infra.core.papyrusEditor" : desc.getId(); //$NON-NLS-1$
+ }
+
+ /**
+ * Inits the diagram model.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param categoryId
+ * the category id
+ */
+ protected void initDiagramModel(ModelSet modelSet, String categoryId) {
+ initDiagrams(modelSet, categoryId);
+ saveDiagram(modelSet);
+ }
+
+
+ /**
+ * Save diagram.
+ *
+ * @param modelSet
+ * the di resource set
+ */
+ private void saveDiagram(ModelSet modelSet) {
+ try {
+ modelSet.save(new NullProgressMonitor());
+ } catch (IOException e) {
+ log.error(e);
+ }
+ }
+
+ /**
+ * Inits the diagrams.
+ *
+ * @param modelSet
+ * the di resource set
+ * @param categoryId
+ * the category id
+ */
+ protected void initDiagrams(ModelSet modelSet, String categoryId) {
+ initDiagrams(modelSet, null, categoryId);
+ }
+
+ /**
+ * Inits the diagrams.
+ *
+ * @param resourceSet
+ * the resource set
+ * @param root
+ * the root
+ * @param categoryId
+ * the category id
+ */
+ protected void initDiagrams(ModelSet resourceSet, EObject root, String categoryId) {
+ UmlModel model = (UmlModel) resourceSet.getModel(UmlModel.MODEL_ID);
+ EList<EObject> roots = model.getResource().getContents();
+ if (!roots.isEmpty()) {
+ root = roots.get(0);
+ if (root instanceof NamedElement) {
+ getCommandStack(resourceSet).execute(new RenameElementCommand(resourceSet.getTransactionalEditingDomain(), (NamedElement) root, getRootElementName()));
+
+ }
+
+ }
+ List<ViewPrototype> creationCommands = getPrototypesFor(categoryId);
+ List<String> diagramName = selectDiagramKindPage.getDiagramName();
+ if (creationCommands.isEmpty()) {
+ createEmptyDiagramEditor(resourceSet);
+ } else {
+ for (int i = 0; i < creationCommands.size(); i++) {
+ creationCommands.get(i).instantiateOn(root, diagramName.get(i));
+ }
+ }
+ }
+
+ /**
+ * Gets the diagram kinds for.
+ *
+ * @param categoryId
+ * the category id
+ * @return the diagram kinds for
+ */
+ protected List<ViewPrototype> getPrototypesFor(String categoryId) {
+ return selectDiagramKindPage.getSelectedPrototypes(categoryId);
+ }
+
+
+ protected List<String> getDiagramNames() {
+ return selectDiagramKindPage.getDiagramName();
+ }
+
+ protected String getRootElementName() {
+ return selectDiagramKindPage.getRootElementName();
+ }
+
+ /**
+ * Creates the empty diagram editor.
+ *
+ * @param modelSet
+ * the model set
+ */
+ private void createEmptyDiagramEditor(ModelSet modelSet) {
+ // Create an empty editor (no diagrams opened)
+ // Geting an IPageMngr is enough to initialize the
+ // SashSystem.
+ EditorUtils.getIPageMngr(DiModelUtils.getDiResource(modelSet));
+ }
+
+ /**
+ * Gets the command stack.
+ *
+ * @param modelSet
+ * the model set
+ * @return the command stack
+ */
+ protected final CommandStack getCommandStack(ModelSet modelSet) {
+ return modelSet.getTransactionalEditingDomain().getCommandStack();
+ }
+
+ /**
+ * Gets the diagram category map.
+ *
+ * @return the diagram category map
+ */
+ protected Map<String, DiagramCategoryDescriptor> getDiagramCategoryMap() {
+ return DiagramCategoryRegistry.getInstance().getDiagramCategoryMap();
+ }
+
+ /**
+ * Diagram category changed.
+ *
+ * @param newCategories
+ * the new categories
+ * @return the i status
+ */
+ public IStatus diagramCategoryChanged(String... newCategories) {
+ return getSelectedStorageProvider().validateDiagramCategories(newCategories);
+ }
+
+ protected void initStorageProvider(IWorkbench workbench, IStructuredSelection selection) {
+
+ NewModelStorageProviderRegistry registry = new NewModelStorageProviderRegistry(workbench.getService(IEvaluationService.class));
+
+ // if we are creating a project, then it is in the workspace
+ if (isCreateProjectWizard()) {
+ this.selectedStorageProvider = new WorkspaceNewModelStorageProvider();
+ } else {
+ // look for a pre-determined selection
+ INewModelStorageProvider firstProvider = null;
+ for (INewModelStorageProvider next : registry) {
+ if (firstProvider == null) {
+ firstProvider = next;
+ }
+
+ // don't match on empty selections because there is
+ // then no context to match against
+ if (!selection.isEmpty() && next.canHandle(selection)) {
+ this.selectedStorageProvider = next;
+ break;
+ }
+ }
+
+ // if the choice is pre-determined, don't show the selection page
+ if (this.selectedStorageProvider == null) {
+ this.selectedStorageProvider = firstProvider;
+
+ // don't need the selection page if only one choice
+ if (registry.size() > 1) {
+ this.storageProviderRegistry = registry;
+ }
+ }
+ }
+ }
+
+ protected SelectStorageProviderPage createSelectStorageProviderPage() {
+ SelectStorageProviderPage result = (storageProviderRegistry == null) ? null : new SelectStorageProviderPage(storageProviderRegistry);
+
+ if (result != null) {
+ result.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ INewModelStorageProvider provider = (INewModelStorageProvider) ((IStructuredSelection) event.getSelection()).getFirstElement();
+ setSelectedStorageProvider(provider);
+ }
+ });
+ }
+
+ return result;
+ }
+
+ protected Iterable<? extends INewModelStorageProvider> getStorageProviders() {
+ Iterable<? extends INewModelStorageProvider> result;
+
+ if (storageProviderRegistry != null) {
+ result = storageProviderRegistry;
+ } else if (selectedStorageProvider != null) {
+ result = Collections.singletonList(selectedStorageProvider);
+ } else {
+ result = Collections.emptyList();
+ }
+
+ return result;
+ }
+
+ protected INewModelStorageProvider getSelectedStorageProvider() {
+ return selectedStorageProvider;
+ }
+
+ private void setSelectedStorageProvider(INewModelStorageProvider provider) {
+ this.selectedStorageProvider = provider;
+
+ // recompute next/previous buttons
+ getContainer().updateButtons();
+ }
+
+ @Override
+ public IWizardPage getNextPage(IWizardPage page) {
+ final List<IWizardPage> allPages = Arrays.asList(getPages());
+ IWizardPage result = null;
+
+ INewModelStorageProvider provider = providersByPage.get(page);
+ if (provider != null) {
+ // it's contributed by a provider. Get the next in the list
+ List<IWizardPage> pages = providerPages.get(provider);
+ int index = pages.indexOf(page);
+ if ((index >= 0) && (index < (pages.size() - 1))) {
+ result = pages.get(index + 1);
+ } else {
+ // get the first page after the provider pages
+ if (endProviderPageIndex < allPages.size()) {
+ result = allPages.get(endProviderPageIndex);
+ }
+ }
+ } else if (allPages.indexOf(page) == startProviderPageIndex) {
+ // get the first page of the selected provider
+ List<IWizardPage> pages = providerPages.get(getSelectedStorageProvider());
+ if (!pages.isEmpty()) {
+ result = pages.get(0);
+ } else {
+ // get the first page after the provider pages
+ if (endProviderPageIndex < allPages.size()) {
+ result = allPages.get(endProviderPageIndex);
+ }
+ }
+ } else {
+ // somewhere away from the boundary of the provider pages
+ result = super.getNextPage(page);
+ }
+
+ return result;
+ }
+
+ @Override
+ public IWizardPage getPreviousPage(IWizardPage page) {
+ final List<IWizardPage> allPages = Arrays.asList(getPages());
+ IWizardPage result = null;
+
+ INewModelStorageProvider provider = providersByPage.get(page);
+ if (provider != null) {
+ // it's contributed by a provider. Get the previous in the list
+ List<IWizardPage> pages = providerPages.get(provider);
+ int index = pages.indexOf(page);
+ if (index > 0) {
+ result = pages.get(index - 1);
+ } else {
+ // get the last page before the provider pages
+ if (startProviderPageIndex >= 0) {
+ result = allPages.get(startProviderPageIndex);
+ }
+ }
+ } else if (allPages.indexOf(page) == endProviderPageIndex) {
+ // get the last page of the selected provider
+ List<IWizardPage> pages = providerPages.get(getSelectedStorageProvider());
+ if (!pages.isEmpty()) {
+ result = pages.get(pages.size() - 1);
+ } else {
+ // get the last page before the provider pages
+ if (startProviderPageIndex >= 0) {
+ result = allPages.get(startProviderPageIndex);
+ }
+ }
+ } else {
+ // somewhere away from the boundary of the provider pages
+ result = super.getPreviousPage(page);
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean canFinish() {
+ boolean result = true;
+ final IWizardPage[] allPages = getPages();
+
+ // only look at the universal pages and those contributed by the current
+ // storage provider
+
+ for (int i = 0; result && (i <= startProviderPageIndex); i++) {
+ result = allPages[i].isPageComplete();
+ }
+
+ if (result) {
+ for (IWizardPage next : providerPages.get(selectedStorageProvider)) {
+ if (!next.isPageComplete()) {
+ result = false;
+ break;
+ }
+ }
+ }
+
+ for (int i = endProviderPageIndex; result && (i < allPages.length); i++) {
+ result = allPages[i].isPageComplete();
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries the user-presentable (translatable) name of the kind of model
+ * that I create. For example, "Papyrus UML" or "Papyrus SysML".
+ *
+ * @return my model kind name
+ */
+ public String getModelKindName() {
+ return "Papyrus"; //$NON-NLS-1$
+ }
+
+ @Deprecated
+ protected void saveDiagramCategorySettings() {
+
+ }
+
+ public boolean isPapyrusRootWizard() {
+ // this.getClass().getName().equals(anObject)
+ return true;
+ }
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateSeveralModelsWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateSeveralModelsWizard.java
new file mode 100644
index 00000000000..d6c489cc154
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/CreateSeveralModelsWizard.java
@@ -0,0 +1,218 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * Creates several new model files - one each selected diagram category.
+ * This functionality in under development now.
+ */
+// TODO: Provide proper file names for the new model file pages after the first one
+// TODO: Allow the user to skip NewModelFile page and invoke finish in advance.
+public class CreateSeveralModelsWizard extends CreateModelWizard {
+
+ /** The my category2model file page map. */
+ private Map<String, NewModelFilePage> myCategory2modelFilePageMap = new TreeMap<String, NewModelFilePage>();
+
+ /** The my selection. */
+ private IStructuredSelection mySelection;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ this.mySelection = selection;
+ }
+
+ @Override
+ public boolean isCreateMultipleModelsWizard() {
+ return true;
+ }
+
+ @Override
+ public IStatus diagramCategoryChanged(String... newCategories) {
+ // clean pages
+ List<String> newCategoriesList = Arrays.asList(newCategories);
+ Collection<String> keys = new HashSet<String>(myCategory2modelFilePageMap.keySet());
+ for(String oldCategory : keys) {
+ if(!newCategoriesList.contains(oldCategory)) {
+ myCategory2modelFilePageMap.remove(oldCategory);
+ }
+ }
+ for(String newCategory : newCategories) {
+ if(!myCategory2modelFilePageMap.containsKey(newCategory)) {
+ NewModelFilePage newPage = createNewModelFilePage(mySelection, newCategory);
+ myCategory2modelFilePageMap.put(newCategory, newPage);
+ }
+ }
+ return super.diagramCategoryChanged(newCategories);
+ }
+
+ /**
+ * Creates the new model file page.
+ *
+ * @param selection
+ * the selection
+ * @param categoryId
+ * the category id
+ * @return the new model file page
+ */
+ protected NewModelFilePage createNewModelFilePage(IStructuredSelection selection, String categoryId) {
+ NewModelFilePage newPage = new NewModelFilePage(createModelFilePageId(categoryId), selection, getModelKindName());
+ newPage.setWizard(this);
+ newPage.setDescription(Messages.bind(Messages.CreateSeveralModelsWizard_new_model_file_page_title, categoryId));
+ return newPage;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
+ */
+ @Override
+ public IWizardPage getNextPage(IWizardPage page) {
+ String pageId = page.getName();
+ if(SelectDiagramKindPage.PAGE_ID.equals(pageId)) {
+ String nextKey = myCategory2modelFilePageMap.keySet().iterator().next();
+ return myCategory2modelFilePageMap.get(nextKey);
+ }
+ if(isModelFilePageId(pageId) && myCategory2modelFilePageMap.containsKey(getCategoryForPage(pageId))) {
+ String category = getCategoryForPage(pageId);
+ Iterator<String> iterator = myCategory2modelFilePageMap.keySet().iterator();
+ while(iterator.hasNext()) {
+ if(category.equals(iterator.next())) {
+ if(iterator.hasNext()) {
+ String nextKey = iterator.next();
+ return myCategory2modelFilePageMap.get(nextKey);
+ }
+ }
+ }
+ return null;
+ }
+ return super.getNextPage(page);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#getPreviousPage(org.eclipse.jface.wizard.IWizardPage)
+ */
+ @Override
+ public IWizardPage getPreviousPage(IWizardPage page) {
+ // TODO allow navigation between pages
+ return super.getPreviousPage(page);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#createSelectDiagramCategoryPage()
+ */
+ @Override
+ protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
+ return new SelectDiagramCategoryPage(true);
+ }
+
+ /**
+ * Perform finish.
+ *
+ * @return true, if successful {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ for(String category : getDiagramCategoryIds()) {
+
+ final URI newURI = createNewModelURI(category);
+ createAndOpenPapyrusModel(newURI, category);
+ }
+
+ // saveDiagramCategorySettings();
+ // saveDiagramKindSettings();
+ return true;
+ }
+
+ @Override
+ protected URI createNewModelURI(String category) {
+ NewModelFilePage newModelFilePage = myCategory2modelFilePageMap.get(category);
+ if(newModelFilePage == null) {
+ Activator.log.error(Messages.bind(Messages.CreateSeveralModelsWizard_cannot_initiate_page, category), new Exception());
+ return null;
+ }
+
+ IFile file = newModelFilePage.createNewFile();
+
+ return URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+ }
+
+ /**
+ * Creates the model file page id.
+ *
+ * @param categoryId
+ * the category id
+ * @return the string
+ */
+ private static String createModelFilePageId(String categoryId) {
+ return NEW_MODEL_FILE_PAGE_PREFIX + categoryId;
+ }
+
+ /**
+ * Checks if is model file page id.
+ *
+ * @param pageId
+ * the page id
+ * @return true, if is model file page id
+ */
+ private static boolean isModelFilePageId(String pageId) {
+ return pageId.startsWith(NEW_MODEL_FILE_PAGE_PREFIX);
+ }
+
+ /**
+ * Gets the category for page.
+ *
+ * @param pageId
+ * the page id
+ * @return the category for page
+ */
+ private static String getCategoryForPage(String pageId) {
+ return pageId.substring(NEW_MODEL_FILE_PAGE_PREFIX.length());
+ }
+
+ /** The Constant NEW_MODEL_FILE_PAGE_PREFIX. */
+ private static final String NEW_MODEL_FILE_PAGE_PREFIX = NewModelFilePage.PAGE_ID + "_"; //$NON-NLS-1$
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/InitModelWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/InitModelWizard.java
new file mode 100644
index 00000000000..f4ce22bb98c
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/InitModelWizard.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import static org.eclipse.papyrus.uml.diagram.wizards.utils.WizardsHelper.getSelectedResourceURI;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.diagram.wizards.command.PapyrusModelFromExistingDomainModelCommand;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage.CategoryProvider;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectRootElementPage;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ *
+ * The New Papyrus Model Wizard.
+ * If being invoke on the *.uml file - initializes a new Papyrus diagram for the selected domain model.
+ * If is selected is empty or in not uml - creates a new Papyrus Model.
+ */
+public class InitModelWizard extends CreateModelWizard {
+
+ /** Select the root element containing the new diagram. */
+ private SelectRootElementPage selectRootElementPage;
+
+ /** The is init from existing domain model. */
+ private boolean isInitFromExistingDomainModel;
+
+ @Override
+ public boolean isInitModelWizard() {
+ return true;
+ }
+
+ /**
+ * Inits the.
+ *
+ * @param workbench
+ * the workbench
+ * @param selection
+ * the selection {@inheritDoc}
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ URI uri = getSelectedResourceURI(selection);
+ isInitFromExistingDomainModel = isSupportedDomainModelResource(uri);
+ super.init(workbench, selection);
+ selectRootElementPage = createSelectRootElementPage(selection);
+ if(isCreateFromExistingDomainModel()) {
+ // Init Model not Create a new one
+ setWindowTitle(Messages.InitModelWizard_init_papyrus_diagram);
+ }
+ }
+
+ /**
+ * Creates the select root element page.
+ *
+ * @param selection
+ * the initial workbench selection
+ * @return the select root element page
+ */
+ protected SelectRootElementPage createSelectRootElementPage(IStructuredSelection selection) {
+ if(!isCreateFromExistingDomainModel()) {
+ // create model - nothing to choose from
+ return null;
+ }
+ return new SelectRootElementPage(selection);
+ }
+
+ /**
+ * Creates the select diagram kind page.
+ *
+ * @return the select diagram kind page {@inheritDoc}
+ */
+ @Override
+ protected SelectDiagramKindPage createSelectDiagramKindPage() {
+ if(isCreateFromExistingDomainModel()) {
+ return new SelectDiagramKindPage(false, new CategoryProvider() {
+
+ public String[] getCurrentCategories() {
+ return getDiagramCategoryIds();
+ }
+
+ }, SelectDiagramKindPage.DEFAULT_CREATION_COMMAND_REGISTRY);
+ };
+ return super.createSelectDiagramKindPage();
+ }
+
+ /**
+ * Adds the pages.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void addPages() {
+ super.addPages();
+ addPageIfNotNull(selectRootElementPage);
+ };
+
+ /**
+ * Returns true is the file can be served as a model model for the diagram.
+ *
+ * @param file
+ * the file
+ * @return true, if is supported domain model file
+ */
+ public static boolean isSupportedDomainModelFile(IFile file) {
+ // if(file != null && UmlModel.UML_FILE_EXTENSION.equals(file.getFileExtension())){System.err.println("is SupportedDomainModelFile");}
+ // else {System.err.println("not SupportedDomainModelFile");}
+ return file != null && isSupportedDomainModelResource(URI.createPlatformResourceURI(file.getFullPath().toString(), true));
+ }
+
+ /**
+ * Returns true if the resource can be served as a model model for the diagram.
+ *
+ * @param uri
+ * the resource's URI
+ * @return true, if is supported domain model resource
+ */
+ public static boolean isSupportedDomainModelResource(URI uri) {
+ return (uri != null) && UmlModel.UML_FILE_EXTENSION.equals(uri.fileExtension());
+ }
+
+ /**
+ * Checks if is supported domain model file.
+ *
+ * @param sselection
+ * the sselection
+ * @return true, if is supported domain model file
+ */
+ public static boolean isSupportedDomainModelFile(IStructuredSelection sselection) {
+ URI uri = getSelectedResourceURI(sselection);
+ return isSupportedDomainModelResource(uri);
+ }
+
+ /**
+ * Creates the papyrus models.
+ *
+ * @param diResourceSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ */
+ @Override
+ protected void createPapyrusModels(ModelSet modelSet, URI newURI) {
+ if(isCreateFromExistingDomainModel()) {
+ RecordingCommand command = new PapyrusModelFromExistingDomainModelCommand(modelSet, newURI, getRoot());
+ getCommandStack(modelSet).execute(command);
+ } else {
+ super.createPapyrusModels(modelSet, newURI);
+ }
+ }
+
+ /**
+ * Inits the domain model.
+ *
+ * @param diResourceSet
+ * the di resource set
+ * @param newURI
+ * the URI of the new model's principal resource
+ * @param diagramCategoryId
+ * the diagram category id {@inheritDoc}
+ */
+ @Override
+ protected void initDomainModel(ModelSet modelSet, final URI newURI, String diagramCategoryId) {
+ if(isCreateFromExistingDomainModel()) {
+ // do nothing
+ } else {
+ super.initDomainModel(modelSet, newURI, diagramCategoryId);
+ }
+ }
+
+ /**
+ * Inits the diagrams.
+ *
+ * @param diResourceSet
+ * the di resource set
+ * @param categoryId
+ * the category id {@inheritDoc}
+ */
+ @Override
+ protected void initDiagrams(ModelSet modelSet, String categoryId) {
+ initDiagrams(modelSet, getRoot(), categoryId);
+ }
+
+ /**
+ * Checks if is creates the from existing domain model.
+ *
+ * @return true, if is creates the from existing domain model
+ */
+ public boolean isCreateFromExistingDomainModel() {
+ return isInitFromExistingDomainModel;
+ }
+
+ @Override
+ public String getDiagramFileExtension(String diagramCategoryId) {
+ if(isCreateFromExistingDomainModel()) {
+ return NewModelFilePage.DEFAULT_DIAGRAM_EXTENSION;
+ }
+ return super.getDiagramFileExtension(diagramCategoryId);
+ }
+
+ /**
+ * Gets the root.
+ *
+ * @return the root
+ */
+ private EObject getRoot() {
+ if(selectRootElementPage != null) {
+ return selectRootElementPage.getModelElement();
+ }
+ return null;
+ }
+
+
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/ModelCopyWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/ModelCopyWizard.java
new file mode 100644
index 00000000000..84471833573
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/ModelCopyWizard.java
@@ -0,0 +1,172 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Ansgar Radermacher ansgar.radermacher@cea.fr
+ *
+ *****************************************************************************/
+
+
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
+import org.eclipse.ui.part.FileEditorInput;
+
+/**
+ * An abstract wizard that can be used for copying model pages. Concrete examples need to
+ * inherit from this class and specify model name and location.
+ *
+ */
+abstract public class ModelCopyWizard extends Wizard implements INewWizard {
+
+ private static final String EXT_DI = ".di"; //$NON-NLS-1$
+
+ private static final String EXT_NOTATION = ".notation"; //$NON-NLS-1$
+
+ private static final String EXT_UML = ".uml"; //$NON-NLS-1$
+
+ private IStructuredSelection selection;
+
+ /**
+ * The model name (without extension)
+ */
+ protected String modelName;
+
+ /**
+ * The model location
+ */
+ protected String modelLocation;
+
+ /**
+ * Constructor taking modelName as parameter. Default location in
+ * models/examples is used
+ * @param modelName the name of the example (without extension)
+ */
+ protected ModelCopyWizard(String modelName) {
+ this.modelName = modelName;
+ this.modelLocation = "/models/examples/"; //$NON-NLS-1$
+ }
+
+ /**
+ * Constructor taking modelName (without extension) and location as parameters
+ * @param modelName the name of the example (without extension)
+ * @param modelLocation location of the model relative to the plug-in in which it is contained
+ */
+ protected ModelCopyWizard(String modelName, String modelLocation) {
+ this.modelName = modelName;
+ this.modelLocation = modelLocation;
+ }
+
+ protected WizardNewFileCreationPage selectionPage;
+
+ @Override
+ public boolean performFinish() {
+ // String fileName = diagramModelFilePage.getFileName();
+ IFile model = copyModel(modelName);
+
+ if(model == null) {
+ return false;
+ }
+
+ IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbenchPage page = wb.getActiveWorkbenchWindow().getActivePage();
+ try {
+ IEditorDescriptor desc = wb.getEditorRegistry().getDefaultEditor(modelName + EXT_DI);
+ IEditorInput input = new FileEditorInput(model);
+ page.openEditor(input, desc.getId(), false);
+ } catch (PartInitException e) {
+ // log.error(e);
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Copy a model (.di/.notation/.uml) into the selected destination folder
+ *
+ * @param sourceModelName
+ */
+ public IFile copyModel(String sourceModelName) {
+ try {
+ IFile model = copyFile(sourceModelName + EXT_DI);
+ copyFile(sourceModelName + EXT_NOTATION);
+ copyFile(sourceModelName + EXT_UML);
+ return model;
+ } catch (CoreException e) {
+ Shell shell = new Shell();
+ String reason = e.getMessage();
+ if(reason.endsWith(Messages.ModelCopyWizard_AlreadyyExists)) {
+ reason += "\n" + //$NON-NLS-1$
+ Messages.ModelCopyWizard_ChooseOtherParentFolder;
+ }
+ MessageDialog.openError(shell, Messages.ModelCopyWizard_CannotCreateCopy, reason);
+ return null;
+ }
+ }
+
+ /**
+ * copy a source file into the selected destination folder
+ *
+ * @param sourceFileName
+ */
+ public IFile copyFile(String sourceFileName) throws CoreException {
+ IPath destPath = selectionPage.getContainerFullPath();
+ InputStream is = getClass().getResourceAsStream(modelLocation + sourceFileName);
+ if(is != null) {
+ destPath = destPath.append(sourceFileName);
+ IFile destFile = ResourcesPlugin.getWorkspace().getRoot().getFile(destPath);
+ destFile.create(is, false, null);
+ return destFile;
+ }
+ else {
+ throw new CoreException(new Status(0, Activator.PLUGIN_ID,
+ String.format(Messages.ModelCopyWizard_CannotOpenFIle, modelLocation + sourceFileName)));
+ }
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ // this.workbench = workbench;
+ this.selection = selection;
+ setWindowTitle(Messages.ModelCopyWizard_CreatePapyrusExample);
+ setNeedsProgressMonitor(true);
+ }
+
+
+ /**
+ * @generated
+ */
+ @Override
+ public void addPages() {
+ selectionPage = new WizardNewFileCreationPage(Messages.ModelCopyWizard_CopyModel, selection);
+ selectionPage.setTitle(String.format(Messages.ModelCopyWizard_SelectParentFolder, modelName));
+ selectionPage.setDescription(Messages.ModelCopyWizard_DoNotChangeFileName);
+ selectionPage.setFileName(modelName);
+ addPage(selectionPage);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWithMultiModelsWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWithMultiModelsWizard.java
new file mode 100644
index 00000000000..9320d20d279
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWithMultiModelsWizard.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+
+/**
+ * The Wizard creates a new Project and a several Papyrus Models of different categories inside it.
+ */
+public class NewPapyrusProjectWithMultiModelsWizard extends NewPapyrusProjectWizard {
+
+ /** The my do not create model for no diagrams. */
+ private boolean myDoNotCreateModelForNoDiagrams;
+
+ /** The Constant WIZARD_ID. */
+ public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.createproject.several"; //$NON-NLS-1$
+
+
+ /**
+ * Instantiates a new new papyrus project with multi models wizard.
+ */
+ public NewPapyrusProjectWithMultiModelsWizard() {
+ this(false);
+ }
+
+ /**
+ * Instantiates a new new papyrus project with multi models wizard.
+ *
+ * @param doNotCreateModelForNoDiagrams
+ * the do not create model for no diagrams
+ */
+ public NewPapyrusProjectWithMultiModelsWizard(boolean doNotCreateModelForNoDiagrams) {
+ myDoNotCreateModelForNoDiagrams = doNotCreateModelForNoDiagrams;
+ }
+
+ @Override
+ public boolean isCreateMultipleModelsWizard() {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard#createSelectDiagramCategoryPage()
+ */
+ @Override
+ protected SelectDiagramCategoryPage createSelectDiagramCategoryPage() {
+ return new SelectDiagramCategoryPage(true);
+ }
+
+ /**
+ * Perform finish.
+ *
+ * @return true, if successful {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ IProject newProjectHandle;
+ try {
+ newProjectHandle = createNewProject();
+ } catch (CoreException e) {
+ Activator.log.error(Messages.NewPapyrusProjectWithMultiModelsWizard_exception_on_project_opening, e);
+ return false;
+ }
+ if (newProjectHandle == null) {
+ return false;
+ }
+ for (String category : getDiagramCategoryIds()) {
+ if (myDoNotCreateModelForNoDiagrams && getPrototypesFor(category).isEmpty()) {
+ // don't create model
+ continue;
+ }
+ final URI newURI = createNewModelURI(category);
+ createAndOpenPapyrusModel(newURI, category);
+ }
+
+ // saveDiagramCategorySettings();
+ // saveDiagramKindSettings();
+ return true;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWizard.java
new file mode 100644
index 00000000000..a9c8e714dcc
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/src/org/eclipse/papyrus/uml/diagram/wizards/wizards/NewPapyrusProjectWizard.java
@@ -0,0 +1,158 @@
+/*****************************************************************************
+ * Copyright (c) 2010, 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:
+ * Tatiana Fesenko (CEA LIST) - Initial API and implementation
+ * Christian W. Damus (CEA) - Support creating models in repositories (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.wizards.wizards;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.uml.diagram.wizards.Activator;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.PapyrusProjectCreationPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
+
+/**
+ * The Wizard creates a new Project and a Papyrus Model inside it.
+ */
+public class NewPapyrusProjectWizard extends CreateModelWizard {
+
+ /** The Constant WIZARD_ID. */
+ public static final String WIZARD_ID = "org.eclipse.papyrus.uml.diagram.wizards.createproject"; //$NON-NLS-1$
+
+ /** The new project page. */
+ private PapyrusProjectCreationPage myProjectPage;
+
+ @Override
+ public boolean isCreateProjectWizard() {
+ return true;
+ }
+
+ /**
+ * Inits the.
+ *
+ * @param workbench
+ * the workbench
+ * @param selection
+ * the selection {@inheritDoc}
+ */
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ super.init(workbench, selection);
+ setWindowTitle(Messages.NewPapyrusProjectWizard_new_papyrus_project);
+ setMyProjectPage(new PapyrusProjectCreationPage(Messages.NewPapyrusProjectWizard_0));
+ getMyProjectPage().setDescription(Messages.NewPapyrusProjectWizard_1);
+ }
+
+
+
+ /**
+ * Adds the pages.
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void addPages() {
+ // Gives the CreateModelWizard the newProjectPage to display it after the selectDiagramCategoryPage
+ setNewProjectPage(getMyProjectPage());
+
+ if (getDiagramCategoryIds() == null) {
+ // If no one Overrides the id list then no specific behavior is expected
+ // We therefore fall back to the original behavior: ask the user to pick a language
+ selectDiagramCategoryPage = new SelectDiagramCategoryPage();
+ }
+
+ super.addPages();
+ }
+
+ /**
+ * Perform finish.
+ *
+ * @return true, if successful {@inheritDoc}
+ */
+ @Override
+ public boolean performFinish() {
+ IProject newProjectHandle;
+ try {
+ newProjectHandle = createNewProject();
+ } catch (CoreException e) {
+ Activator.log.error(Messages.NewPapyrusProjectWizard_exception_on_opening, e);
+ return false;
+ }
+ if (newProjectHandle == null) {
+ return false;
+ }
+ return super.performFinish();
+ }
+
+ /**
+ * Creates the new project.
+ *
+ * @return the i project
+ * @throws CoreException
+ * the core exception
+ */
+ protected IProject createNewProject() throws CoreException {
+ // get a project handle
+ final IProject project = getMyProjectPage().getProjectHandle();
+
+ // get a project descriptor
+ java.net.URI projectLocationURI = null;
+ if (!getMyProjectPage().useDefaults()) {
+ projectLocationURI = getMyProjectPage().getLocationURI();
+ }
+
+ IProjectDescription projectDescription = null;
+ NullProgressMonitor progressMonitor = new NullProgressMonitor();
+ if (!project.exists()) {
+ projectDescription = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());
+ if (projectLocationURI != null) {
+ projectDescription.setLocationURI(projectLocationURI);
+ }
+ project.create(projectDescription, new SubProgressMonitor(progressMonitor, 1));
+ project.open(new SubProgressMonitor(progressMonitor, 1));
+ } else {
+ // projectDescription = project.getDescription();
+ project.open(new SubProgressMonitor(progressMonitor, 1));
+ }
+
+ return project;
+ }
+
+ @Override
+ protected URI createNewModelURI(String categoryId) {
+ IPath newFilePath = getMyProjectPage().getProjectHandle().getFullPath().append(getMyProjectPage().getFileName() + "." + getDiagramFileExtension(categoryId)); //$NON-NLS-1$
+ return URI.createPlatformResourceURI(newFilePath.toString(), true);
+ }
+
+ public PapyrusProjectCreationPage getMyProjectPage() {
+ return myProjectPage;
+ }
+
+ public void setMyProjectPage(PapyrusProjectCreationPage myProjectPage) {
+ this.myProjectPage = myProjectPage;
+ }
+
+ protected WizardNewProjectCreationPage createNewProjectCreationPage() {
+ return this.myProjectPage;
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/ProfileCopyTemplateTransfo.qvto b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/ProfileCopyTemplateTransfo.qvto
new file mode 100644
index 00000000000..c9476a1b358
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/ProfileCopyTemplateTransfo.qvto
@@ -0,0 +1,10 @@
+modeltype UML uses "http://www.eclipse.org/uml2/5.0.0/UML";
+
+
+transformation ProfileCopyTemplateTransfo(in template : UML, inout target : UML);
+
+
+main() {
+
+ template.objectsOfType(Profile).ownedElement->clone();
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/UMLCopyTemplateTransfo.qvto b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/UMLCopyTemplateTransfo.qvto
new file mode 100644
index 00000000000..402c0658485
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards/transforms/UMLCopyTemplateTransfo.qvto
@@ -0,0 +1,10 @@
+modeltype UML uses "http://www.eclipse.org/uml2/5.0.0/UML";
+
+
+transformation UMLCopyTemplateTransfo(in template : UML, inout target : UML);
+
+
+main() {
+
+ template.objectsOfType(Model).ownedElement->clone();
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.perspective/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.perspective/plugin.xml
index 01e6e9bd89d..cb63c1d9b2b 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.perspective/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.perspective/plugin.xml
@@ -14,7 +14,7 @@
point="org.eclipse.ui.navigator.navigatorContent">
<commonWizard
type="new"
- wizardId="org.eclipse.papyrus.uml.diagram.wizards.1createproject">
+ wizardId="org.eclipse.papyrus.uml.diagram.wizards.createproject">
<enablement>
<with
variable="activeWorkbenchWindow.activePerspective">
diff --git a/plugins/uml/org.eclipse.papyrus.uml.perspective/src/org/eclipse/papyrus/uml/perspective/PapyrusPerspective.java b/plugins/uml/org.eclipse.papyrus.uml.perspective/src/org/eclipse/papyrus/uml/perspective/PapyrusPerspective.java
index b398feb39ee..7216a0ca764 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.perspective/src/org/eclipse/papyrus/uml/perspective/PapyrusPerspective.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.perspective/src/org/eclipse/papyrus/uml/perspective/PapyrusPerspective.java
@@ -13,8 +13,8 @@
*****************************************************************************/
package org.eclipse.papyrus.uml.perspective;
-import org.eclipse.papyrus.uml.diagram.wizards.CreateModelWizard;
-import org.eclipse.papyrus.uml.diagram.wizards.NewPapyrusProjectWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard;
import org.eclipse.papyrus.views.validation.internal.ModelValidationView;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
@@ -45,7 +45,7 @@ public class PapyrusPerspective implements IPerspectiveFactory {
* Add actions into the workbench UI.
*
* @param layout
- * the page layout
+ * the page layout
*
* @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
*/
@@ -74,7 +74,7 @@ public class PapyrusPerspective implements IPerspectiveFactory {
* Defines the layout of the perspective (where and which views are available).
*
* @param layout
- * the page layout
+ * the page layout
*
* @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
*/
diff --git a/plugins/uml/org.eclipse.papyrus.uml.service.validation/src/org/eclipse/papyrus/uml/service/validation/OCLEValidatorAdapter.java b/plugins/uml/org.eclipse.papyrus.uml.service.validation/src/org/eclipse/papyrus/uml/service/validation/OCLEValidatorAdapter.java
index 7f8cf94dc23..9a002a174ff 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.service.validation/src/org/eclipse/papyrus/uml/service/validation/OCLEValidatorAdapter.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.service.validation/src/org/eclipse/papyrus/uml/service/validation/OCLEValidatorAdapter.java
@@ -26,6 +26,9 @@ import org.eclipse.ocl.pivot.internal.delegate.OCLDelegateValidator;
import org.eclipse.ocl.pivot.uml.internal.validation.UMLOCLEValidator;
import org.eclipse.papyrus.infra.services.validation.EValidatorAdapter;
import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.MultiplicityElement;
import org.eclipse.uml2.uml.OpaqueAction;
import org.eclipse.uml2.uml.OpaqueBehavior;
import org.eclipse.uml2.uml.OpaqueExpression;
@@ -72,6 +75,23 @@ public class OCLEValidatorAdapter
return batchValidate(eObject, diagnostics, context);
}
+ /**
+ * Validate if only the lower and the upper are integer values.
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.uml2.uml.util.UMLValidator#validateMultiplicityElement_validateUpperGeLower(org.eclipse.uml2.uml.MultiplicityElement, org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
+ */
+ @Override
+ public boolean validateMultiplicityElement_validateUpperGeLower(final MultiplicityElement multiplicityElement, final DiagnosticChain diagnostics, final Map<Object, Object> context) {
+ boolean result = false;
+ if (((multiplicityElement.getLowerValue() instanceof LiteralInteger || multiplicityElement.getLowerValue() instanceof LiteralUnlimitedNatural)
+ && (multiplicityElement.getUpperValue() instanceof LiteralInteger || multiplicityElement.getUpperValue() instanceof LiteralUnlimitedNatural))) {
+ result = super.validateMultiplicityElement_validateUpperGeLower(multiplicityElement, diagnostics, context);
+ }
+
+ return result;
+ }
+
@Override
public boolean validateInstanceSpecification(InstanceSpecification instanceSpecification,
DiagnosticChain diagnostics, Map<Object, Object> context) {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/META-INF/MANIFEST.MF
index 51e2340bde1..c24995cc83c 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/META-INF/MANIFEST.MF
@@ -1,7 +1,10 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0"
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.1.0.qualifier
@@ -12,4 +15,5 @@ Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.uml.templaterepository;single
ton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.eclipse.papyrus.uml.templaterepository
diff --git a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/plugin.xml
index afd08bf5f14..205fc833c99 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/plugin.xml
@@ -3,18 +3,19 @@
<plugin>
<extension
point="org.eclipse.papyrus.uml.diagram.wizards.templates">
- <template
+ <transformation
+ Transformation="org.eclipse.papyrus.uml.templaterepository.ImportUMLPrimitiveTypesInModel"
file="resource/ModelWithBasicTypes.uml"
- id="org.eclipse.papyrus.uml.templaterepository.ModelWithBasicType"
+ id="org.eclipse.papyrus.uml.templaterepository.ImportUMLPrimitiveTypesInModel"
language="uml"
name="A UML model with basic primitive types">
- </template>
- <template
- file="resource/ProfileWithBasicTypes.profile.uml"
- id="org.eclipse.papyrus.uml.templaterepository.ProfileWithBasicTypes.profile.uml"
+ </transformation>
+
+ <transformation
+ Transformation="org.eclipse.papyrus.uml.templaterepository.ImportUMLPrimitiveTypesInProfile"
+ id="org.eclipse.papyrus.uml.templaterepository.ImportUMLPrimitiveTypesInProfile"
language="profile"
name="A UML profile with basic primitive types">
- </template>
- </extension>
+ </transformation> </extension>
</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/Activator.java b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/Activator.java
index 6850043a20b..019b5031976 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/Activator.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/Activator.java
@@ -1,5 +1,6 @@
package org.eclipse.papyrus.uml.templaterepository;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -14,6 +15,9 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
+ /** Logging helper. */
+ public static LogHelper log;
+
/**
* The constructor
*/
@@ -22,18 +26,19 @@ public class Activator extends AbstractUIPlugin {
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
+ log = new LogHelper(plugin);
}
/*
* (non-Javadoc)
- *
+ *
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
@Override
diff --git a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInModel.java b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInModel.java
new file mode 100755
index 00000000000..21e52792217
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInModel.java
@@ -0,0 +1,96 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Quentin Le Menez quentin.lemenez@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.templaterepository;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator;
+//import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.uml2.uml.PackageImport;
+
+//import org.eclipse.uml2.uml.UMLFactory;
+
+
+public class ImportUMLPrimitiveTypesInModel implements IGenerator {
+ // This class is used when the element is checked inside SelectModelTemplateComposite's templateTableViewer
+
+ private ModelSet modelSet;
+
+ private org.eclipse.uml2.uml.Package rootElement;
+
+ private EObject primitiveTypes;
+
+
+ public void execute() {
+ // Get the umlModel from the modelSet
+ // UmlModel umlModel = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ // Get its resource
+ // Resource umlResource = umlModel.getResource();
+ Resource umlResource = UmlUtils.getUmlModel(modelSet).getResource();
+
+ // Select the root element to add the wanted imports
+ rootElement = (org.eclipse.uml2.uml.Model) umlResource.getContents().get(0);
+
+ // Load the needed libraries. Calling them directly with the path renders the resource folder obsolete ?
+ URI primitiveTypesURI = URI.createURI("pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml").appendFragment("_0");
+ primitiveTypes = modelSet.getEObject(primitiveTypesURI, true);
+
+ // Creates the import packages at the root of the model (elements of type packageImport)
+ this.getCommandStack(modelSet).execute(new RecordingCommand(modelSet.getTransactionalEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ // PackageImport packageImport = UMLFactory.eINSTANCE.createPackageImport();
+ // packageImport.setImportedPackage((org.eclipse.uml2.uml.Package) ImportUMLPrimitiveTypesInModel.this.primitiveTypes);
+ // rootElement.getPackageImports().add(packageImport);
+
+ PackageImport importPrimitivePack = rootElement.createPackageImport((org.eclipse.uml2.uml.Package) primitiveTypes);
+ if (!rootElement.getPackageImports().contains(importPrimitivePack)) {
+ rootElement.getPackageImports().add(importPrimitivePack);
+ }
+
+ try {
+ rootElement.eResource().save(Collections.EMPTY_MAP);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ });
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator#setModelSet(org.eclipse.papyrus.uml.diagram.wizards.transformation.ModelSet)
+ *
+ * @param modelSet
+ */
+ public void setModelSet(ModelSet modelSet) {
+ this.modelSet = modelSet;
+ }
+
+ protected final CommandStack getCommandStack(ModelSet modelSet) {
+ return modelSet.getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public ModelSet getModelSet() {
+ return this.modelSet;
+ }
+
+}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInProfile.java b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInProfile.java
new file mode 100755
index 00000000000..521bf6d5100
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.templaterepository/src/org/eclipse/papyrus/uml/templaterepository/ImportUMLPrimitiveTypesInProfile.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Quentin Le Menez quentin.lemenez@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.templaterepository;
+
+import java.io.IOException;
+import java.util.Collections;
+
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator;
+//import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.uml2.uml.PackageImport;
+
+
+public class ImportUMLPrimitiveTypesInProfile implements IGenerator {
+ // This class is used when the element is checked inside SelectModelTemplateComposite's templateTableViewer
+
+ private ModelSet modelSet;
+
+ private org.eclipse.uml2.uml.Package rootElement;
+
+ private EObject primitiveTypes;
+
+ private EObject umlMetamodel;
+
+ public void execute() {
+ // Get the umlModel from the modelSet
+ // UmlModel umlModel = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ // Get its resource
+ // Resource umlResource = umlModel.getResource();
+ Resource umlResource = UmlUtils.getUmlModel(modelSet).getResource();
+
+ // Select the root element to add the wanted imports
+ rootElement = (org.eclipse.uml2.uml.Profile) umlResource.getContents().get(0);
+
+ // Load the needed libraries. Calling them directly with the path renders the resource folder obsolete ?
+ URI primitiveTypesURI = URI.createURI("pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml", true).appendFragment("_0");
+ primitiveTypes = modelSet.getEObject(primitiveTypesURI, true);
+ URI umlMetamodelURI = URI.createURI("pathmap://UML_METAMODELS/UML.metamodel.uml", true).appendFragment("_0");
+ umlMetamodel = modelSet.getEObject(umlMetamodelURI, true);
+
+ // Creates the import packages at the root of the model (elements of type packageImport)
+ this.getCommandStack(modelSet).execute(new RecordingCommand(modelSet.getTransactionalEditingDomain()) {
+
+ @Override
+ protected void doExecute() {
+ // PackageImport packageImport = UMLFactory.eINSTANCE.createPackageImport();
+ // packageImport.setImportedPackage((org.eclipse.uml2.uml.Package) ImportUMLPrimitiveTypesInModel.this.primitiveTypes);
+ // rootElement.getPackageImports().add(packageImport);
+
+ // Creates the import packages at the root of the model (elements of type packageImport)
+ PackageImport importPrimitivePack = rootElement.createPackageImport((org.eclipse.uml2.uml.Package) primitiveTypes);
+ PackageImport importMetamodelPack = rootElement.createPackageImport((org.eclipse.uml2.uml.Package) umlMetamodel);
+
+ if (!rootElement.getPackageImports().contains(importPrimitivePack)) {
+ rootElement.getPackageImports().add(importPrimitivePack);
+ }
+ if (!rootElement.getPackageImports().contains(importMetamodelPack)) {
+ rootElement.getPackageImports().add(importMetamodelPack);
+ }
+
+ try {
+ rootElement.eResource().save(Collections.EMPTY_MAP);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ });
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.wizards.transformation.IGenerator#setModelSet(org.eclipse.papyrus.uml.diagram.wizards.transformation.ModelSet)
+ *
+ * @param modelSet
+ */
+ public void setModelSet(ModelSet modelSet) {
+ this.modelSet = modelSet;
+ }
+
+ protected final CommandStack getCommandStack(ModelSet modelSet) {
+ return modelSet.getTransactionalEditingDomain().getCommandStack();
+ }
+
+ public ModelSet getModelSet() {
+ return this.modelSet;
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi
index 0addaed8040..585b00013e2 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/model/environment.xmi
@@ -7,6 +7,11 @@
label="Xtext Reference Editor"
widgetClass="UMLStyledTextReferenceDialog"
namespace="//@namespaces.0"/>
+ <propertyEditorTypes
+ label="Multiplicity Xtext Reference Editor"
+ widgetClass="MultiplicityXTextDialog"
+ namespace="//@namespaces.0"
+ type="Reference"/>
<namespaces
name="xtexteditor"
value="org.eclipse.papyrus.uml.properties.xtext.widget.property"/>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/MultiplicityXTextValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/MultiplicityXTextValueEditor.java
new file mode 100644
index 00000000000..02a2969b997
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/MultiplicityXTextValueEditor.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.xtext.widget;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractReferenceDialog;
+import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog;
+import org.eclipse.papyrus.infra.widgets.validator.UnlimitedNaturalValidator;
+import org.eclipse.papyrus.uml.properties.widgets.ExtendedMultiplicityDialog;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * This allow to define the multiplicity editors (with 2 modes) with XText editors for lower and upper ValueSpecification
+ */
+public class MultiplicityXTextValueEditor extends ExtendedMultiplicityDialog implements SelectionListener {
+
+ /**
+ * The default lower value direct editor configuration class name.
+ */
+ private final static String DEFAULT_LOWER_VALUE_DIRECT_EDITOR_CONFIGURATION = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration";
+
+ /**
+ * The default upper value direct editor configuration class name.
+ */
+ private final static String DEFAULT_UPPER_VALUE_DIRECT_EDITOR_CONFIGURATION = "org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration";
+
+
+ /**
+ * The lower value direct editor configuration class name edited.
+ */
+ private String lowerValueDirectEditorConfiguration;
+
+ /**
+ * The upper value direct editor configuration class name edited.
+ */
+ private String upperValueDirectEditorConfiguration;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ */
+ public MultiplicityXTextValueEditor(final Composite parent, final int style) {
+ this(parent, style, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ * @param preferenceStore
+ * The preference store.
+ */
+ public MultiplicityXTextValueEditor(final Composite parent, final int style, final IPreferenceStore preferenceStore) {
+ super(parent, style, preferenceStore);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog#createLowerValueSpecificationEditor(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ protected AbstractReferenceDialog createLowerValueSpecificationEditor(final Composite parent, final int style) {
+ final AbstractReferenceDialog lowerValueSpecificationEditor = super.createLowerValueSpecificationEditor(parent, style);
+ if (null == lowerValueDirectEditorConfiguration) {
+ lowerValueDirectEditorConfiguration = DEFAULT_LOWER_VALUE_DIRECT_EDITOR_CONFIGURATION;
+ }
+ ((UMLXtextReferenceValueEditor) lowerValueSpecificationEditor).setDirectEditorConfiguration(lowerValueDirectEditorConfiguration);
+ return lowerValueSpecificationEditor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog#createLowerValueSpecificationEditor(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ protected AbstractReferenceDialog createUpperValueSpecificationEditor(final Composite parent, final int style) {
+ final AbstractReferenceDialog upperValueSpecificationEditor = new UMLXtextReferenceValueEditor(parent, style, new UnlimitedNaturalValidator());
+ if (null == upperValueDirectEditorConfiguration) {
+ upperValueDirectEditorConfiguration = DEFAULT_UPPER_VALUE_DIRECT_EDITOR_CONFIGURATION;
+ }
+ ((UMLXtextReferenceValueEditor) upperValueSpecificationEditor).setDirectEditorConfiguration(upperValueDirectEditorConfiguration);
+ return upperValueSpecificationEditor;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog#createValueSpecificationEditor(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ protected StyledTextReferenceDialog createValueSpecificationEditor(final Composite parent, final int style) {
+ return new UMLXtextReferenceValueEditor(parent, style);
+ }
+
+ /**
+ * Sets the lower value direct editor configuration class name.
+ *
+ * @param lowerValueDirectEditorConfiguration
+ * The lower value direct editor configuration class name.
+ */
+ public void setLowerValueDirectEditorConfiguration(final String lowerValueDirectEditorConfiguration) {
+ this.lowerValueDirectEditorConfiguration = lowerValueDirectEditorConfiguration;
+ if (null != lowerValueEditor) {
+ ((UMLXtextReferenceValueEditor) lowerValueEditor).setDirectEditorConfiguration(lowerValueDirectEditorConfiguration);
+ }
+ }
+
+ /**
+ * Sets the upper value direct editor configuration class name.
+ *
+ * @param upperValueDirectEditorConfiguration
+ * The upper valuedirect editor configuration class name.
+ */
+ public void setUpperValueDirectEditorConfiguration(final String upperValueDirectEditorConfiguration) {
+ this.upperValueDirectEditorConfiguration = upperValueDirectEditorConfiguration;
+ if (null != upperValueEditor) {
+ ((UMLXtextReferenceValueEditor) upperValueEditor).setDirectEditorConfiguration(upperValueDirectEditorConfiguration);
+ }
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java
index e65e313da96..d7b69c6b1c6 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/UMLXtextReferenceValueEditor.java
@@ -25,6 +25,7 @@ import org.eclipse.papyrus.infra.emf.dialog.NestedEditingDialogContext;
import org.eclipse.papyrus.infra.widgets.editors.StyledTextReferenceDialog;
import org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor;
import org.eclipse.papyrus.infra.widgets.selectors.StringSelector;
+import org.eclipse.papyrus.infra.widgets.validator.AbstractValidator;
import org.eclipse.papyrus.uml.properties.xtext.Activator;
import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
import org.eclipse.papyrus.uml.xtext.integration.StyledTextXtextAdapter;
@@ -39,6 +40,7 @@ import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
/**
@@ -49,6 +51,17 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
implements IContextElementProvider, SelectionListener {
/**
+ * The equal character.
+ */
+ private static final String EQUAL = "="; //$NON-NLS-1$
+
+ /**
+ * The default value to validate.
+ */
+ private static final String DEFAULT_VALIDATE_VALUE = "0"; //$NON-NLS-1$
+
+
+ /**
* The xtext adapter.
*/
private StyledTextXtextAdapter xtextAdapter;
@@ -74,6 +87,7 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
*/
private String directEditorConfiguration;
+
/**
* Constructor.
*
@@ -83,30 +97,40 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
* The style for the widget.
*/
public UMLXtextReferenceValueEditor(final Composite parent, final int style) {
- super(parent, style);
+ this(parent, style, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ * @param targetValidator
+ * The validator used for the styled text.
+ */
+ public UMLXtextReferenceValueEditor(final Composite parent, final int style, final AbstractValidator targetValidator) {
+ super(parent, style, targetValidator);
styledTextStringEditor.getText().addFocusListener(new FocusListener() {
public void focusLost(FocusEvent e) {
if (canParse) {
IParser parser = getParser();
- if (null == xtextAdapter) {
- return;
- }
-
- if (null != xtextAdapter
- && null != xtextAdapter.getCompletionProposalAdapter()
- && xtextAdapter.getCompletionProposalAdapter()
- .delayedIsPopupOpen()) {
- // ignore focus lost
- return;
+ if (null != xtextAdapter) {
+ if (null == xtextAdapter
+ || null == xtextAdapter.getCompletionProposalAdapter()
+ || !xtextAdapter.getCompletionProposalAdapter()
+ .delayedIsPopupOpen()) {
+ manageParserCommand(parser);
+
+ // Manage the color field and the control decoration
+ styledTextStringEditor.notifyListeners(SWT.FocusOut, new Event());
+ styledTextStringEditor.changeColorField();
+ controlDecoration.hide();
+ canParse = false;
+ }
}
- manageParserCommand(parser);
-
- // Manage the color field and the control decoration
- styledTextStringEditor.notifyListeners(SWT.FocusOut, new Event());
- styledTextStringEditor.changeColorField();
- controlDecoration.hide();
- canParse = false;
}
}
@@ -164,7 +188,13 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
final Composite parent, final String initialValue, final int style) {
// Change the style to set the singleText to a single line
int createdStyle = style | SWT.SINGLE;
- return new StyledTextStringEditor(parent, createdStyle) {
+ return new StyledTextStringEditor(parent, createdStyle, targetValidator) {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#createStyledText(org.eclipse.swt.widgets.Composite, java.lang.String, int)
+ */
public StyledText createStyledText(final Composite parent, final String value,
final int createdStyle) {
StyledText txt = new StyledText(parent, createdStyle);
@@ -175,9 +205,9 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
}
/**
+ * {@inheritDoc}
+ *
* @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#keyPressed(org.eclipse.swt.events.KeyEvent)
- *
- * @param e
*/
@Override
public void keyPressed(final KeyEvent e) {
@@ -203,8 +233,9 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
}
/**
+ * {@inheritDoc}
+ *
* @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#notifyChange()
- *
*/
@Override
protected void notifyChange() {
@@ -221,9 +252,9 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
}
/**
+ * {@inheritDoc}
+ *
* @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#keyReleased(org.eclipse.swt.events.KeyEvent)
- *
- * @param e
*/
@Override
public void keyReleased(KeyEvent e) {
@@ -231,6 +262,30 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
// Manage the 'enter' key with 'keyPressed' instead of 'keyReleased'
// because the proposal window is already closed in the 'keyReleased' method
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.StyledTextStringEditor#getTextToValidate()
+ */
+ @Override
+ protected String getTextToValidate() {
+ // Manage the string to parse (because the XText parser allow a filled name with the value)
+ String result = super.getTextToValidate();
+ // If the text contains '=', just parse the value after
+ if (result.contains(EQUAL) && result.indexOf(EQUAL) != (result.length() - 1)) {
+ result = result.substring(result.indexOf(EQUAL) + 1, result.length());
+ } else {
+ // Try to parse the value as integer if id doesn't contain '='
+ try {
+ Integer.parseInt(result);
+ } catch (NumberFormatException exception) {
+ // Set the default value validation to avoid validation error
+ result = DEFAULT_VALIDATE_VALUE;
+ }
+ }
+ return result;
+ }
};
}
@@ -358,7 +413,12 @@ public class UMLXtextReferenceValueEditor extends StyledTextReferenceDialog
protected void doBinding() {
super.doBinding();
updateXtextAdapters(styledTextStringEditor.getText());
- styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ // Manage the setText of StyledText by a Runnable because the UI is blocker previously
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ styledTextStringEditor.setValue(labelProvider.getText(getValue()));
+ }
+ });
updateLabel();
}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/MultiplicityXTextDialog.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/MultiplicityXTextDialog.java
new file mode 100644
index 00000000000..af2f35884ef
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/src/org/eclipse/papyrus/uml/properties/xtext/widget/property/MultiplicityXTextDialog.java
@@ -0,0 +1,117 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.xtext.widget.property;
+
+import org.eclipse.papyrus.uml.properties.preferences.MultiplicityEditorPreferences;
+import org.eclipse.papyrus.uml.properties.widgets.MultiplicityDialog;
+import org.eclipse.papyrus.uml.properties.xtext.widget.MultiplicityXTextValueEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The multiplicity dialog which allow to manage the XText editors for the multiplicity lower and upper values.
+ */
+public class MultiplicityXTextDialog extends MultiplicityDialog {
+
+ /**
+ * The lower value direct editor configuration name class.
+ */
+ private String lowerValueDirectEditorConfiguration = null;
+
+ /**
+ * The lower value direct editor configuration name class.
+ */
+ private String upperValueDirectEditorConfiguration = null;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ */
+ public MultiplicityXTextDialog(final Composite parent, final int style) {
+ super(parent, style);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.properties.widgets.MultiplicityDialog#createMultiplicityDialog(org.eclipse.swt.widgets.Composite, int)
+ */
+ @Override
+ protected org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog createMultiplicityDialog(final Composite parent, final int style) {
+ return editor = new MultiplicityXTextValueEditor(parent, style, MultiplicityEditorPreferences.instance.getPreferenceStore());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.properties.widgets.MultiplicityDialog#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+ if (null != editor && null != getLowerValueDirectEditorConfiguration()) {
+ ((MultiplicityXTextValueEditor) editor).setLowerValueDirectEditorConfiguration(getLowerValueDirectEditorConfiguration());
+ }
+ if (null != editor && null != getUpperValueDirectEditorConfiguration()) {
+ ((MultiplicityXTextValueEditor) editor).setUpperValueDirectEditorConfiguration(getUpperValueDirectEditorConfiguration());
+ }
+ }
+
+ /**
+ * Sets the lower value editor configuration attribute from XWT file.
+ *
+ * @param lowerValueDirectEditorConfiguration
+ * The lower value direct editor configuration class name.
+ */
+ public void setLowerValueDirectEditorConfiguration(final String lowerValueDirectEditorConfiguration) {
+ this.lowerValueDirectEditorConfiguration = lowerValueDirectEditorConfiguration;
+ if (null != editor && null != lowerValueDirectEditorConfiguration) {
+ ((MultiplicityXTextValueEditor) editor).setLowerValueDirectEditorConfiguration(lowerValueDirectEditorConfiguration);
+ }
+ }
+
+ /**
+ * Gets the lower value direct editor configuration attribute value.
+ *
+ * @return The lower value direct editor configuration attribute value.
+ */
+ public String getLowerValueDirectEditorConfiguration() {
+ return lowerValueDirectEditorConfiguration;
+ }
+
+ /**
+ * Sets the lower value editor configuration attribute from XWT file.
+ *
+ * @param upperValueDirectEditorConfiguration
+ * The lower value direct editor configuration class name.
+ */
+ public void setUpperValueDirectEditorConfiguration(final String upperValueDirectEditorConfiguration) {
+ this.upperValueDirectEditorConfiguration = upperValueDirectEditorConfiguration;
+ if (null != editor && null != upperValueDirectEditorConfiguration) {
+ ((MultiplicityXTextValueEditor) editor).setUpperValueDirectEditorConfiguration(upperValueDirectEditorConfiguration);
+ }
+ }
+
+ /**
+ * Gets the upper value direct editor configuration attribute value.
+ *
+ * @return The upper value direct editor configuration attribute value.
+ */
+ public String getUpperValueDirectEditorConfiguration() {
+ return upperValueDirectEditorConfiguration;
+ }
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
index f7d274a84ce..1e1ed01bdcd 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
@@ -4,6 +4,7 @@ Export-Package: org.eclipse.papyrus.uml.properties.constraints,
org.eclipse.papyrus.uml.properties.databinding,
org.eclipse.papyrus.uml.properties.datatype,
org.eclipse.papyrus.uml.properties.modelelement,
+ org.eclipse.papyrus.uml.properties.preferences,
org.eclipse.papyrus.uml.properties.profile.ui.actions,
org.eclipse.papyrus.uml.properties.profile.ui.compositeforview,
org.eclipse.papyrus.uml.properties.profile.ui.compositesformodel,
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
index c7f09140fa8..89281fa422c 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/Environment.xmi
@@ -89,6 +89,11 @@
widgetClass="GenericUMLDatatypeEditor"
namespace="//@namespaces.0"
type="Reference"/>
+ <propertyEditorTypes
+ label="Multiplicity Editor"
+ widgetClass="MultiplicityDialog"
+ namespace="//@namespaces.0"
+ type="Reference"/>
<namespaces
name="uml"
value="org.eclipse.papyrus.uml.properties.widgets"/>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt
index ee8b8e276d0..2d1ae899e4a 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MemberEnd.xwt
@@ -1,19 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Group xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- text="Member End">
- <Group.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Group.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- <ppe:EnumCombo input="{Binding}" property="MemberEnd:owner"></ppe:EnumCombo>
- <ppe:BooleanRadio input="{Binding}" property="MemberEnd:navigable"></ppe:BooleanRadio>
- <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Group xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:j="clr-namespace:java.lang"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ text="Member End">
+ <Group.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Group.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="1"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ <ppe:EnumCombo input="{Binding}" property="MemberEnd:owner"></ppe:EnumCombo>
+ <ppe:BooleanRadio input="{Binding}" property="MemberEnd:navigable"></ppe:BooleanRadio>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ </Composite>
</Group> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MultipleProperty.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MultipleProperty.xwt
index 1c334dacda8..1feccc483cd 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MultipleProperty.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/MultipleProperty.xwt
@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:j="clr-namespace:java.lang" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt
index a537acc67ce..09d021d14e2 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleActionInputPin.xwt
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang" 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:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog property="UML:TypedElement:type"
- input="{Binding}"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang" 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:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog property="UML:TypedElement:type"
+ input="{Binding}"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectorEnd.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectorEnd.xwt
index d242b1d5806..0ad3a11345b 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectorEnd.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleConnectorEnd.xwt
@@ -1,24 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
- xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt
index 54d1e2c0618..9fec90a720e 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleInputPin.xwt
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog property="UML:TypedElement:type"
- input="{Binding}"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog property="UML:TypedElement:type"
+ input="{Binding}"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMultiplicityElement.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMultiplicityElement.xwt
index 7acfbd06023..b28b772f34e 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMultiplicityElement.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleMultiplicityElement.xwt
@@ -1,23 +1,24 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt
index 5f92405f885..9fc7a230e6e 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleOutputPin.xwt
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog property="UML:TypedElement:type"
- input="{Binding}"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog property="UML:TypedElement:type"
+ input="{Binding}"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt
index 7d773898a5b..2caf5db80f6 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleParameter.xwt
@@ -1,43 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:Parameter:defaultValue"></ppe:ReferenceDialog>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isException"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Parameter:isStream"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:direction"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:Parameter:effect"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:Parameter:defaultValue"></ppe:ReferenceDialog>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt
index 80682854676..02f73d779b7 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePin.xwt
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog property="UML:TypedElement:type"
- input="{Binding}"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog property="UML:TypedElement:type"
+ input="{Binding}"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt
index 3d698e2651d..e49e8af1500 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SinglePort.xwt
@@ -1,60 +1,60 @@
-<?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:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Port:isBehavior"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Port:isService"></ppe:BooleanRadio>
- <ppe:BooleanRadio property="UML:Port:isConjugated"
- input="{Binding}"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:Property:defaultValue"></ppe:ReferenceDialog>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:Port:provided"></ppe:MultiReference>
- <ppe:MultiReference input="{Binding}" property="UML:Port:required"></ppe:MultiReference>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}"
- property="UML:Property:subsettedProperty"></ppe:MultiReference>
- </Composite>
+<?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:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isBehavior"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Port:isService"></ppe:BooleanRadio>
+ <ppe:BooleanRadio property="UML:Port:isConjugated"
+ input="{Binding}"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:Property:defaultValue"></ppe:ReferenceDialog>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:Port:provided"></ppe:MultiReference>
+ <ppe:MultiReference input="{Binding}" property="UML:Port:required"></ppe:MultiReference>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:Property:subsettedProperty"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt
index 7a2951d21f8..16462827ca3 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleProperty.xwt
@@ -1,42 +1,43 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:Property:defaultValue"></ppe:ReferenceDialog>
- <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
- <ppe:MultiReference input="{Binding}"
- property="UML:Property:subsettedProperty"></ppe:MultiReference>
- <ppe:MultiReference property="UML:Property:redefinedProperty"
- input="{Binding}"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerived"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Property:isDerivedUnion"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:Property:defaultValue"></ppe:ReferenceDialog>
+ <ppe:EnumCombo input="{Binding}" property="UML:Property:aggregation"></ppe:EnumCombo>
+ <ppe:MultiReference input="{Binding}"
+ property="UML:Property:subsettedProperty"></ppe:MultiReference>
+ <ppe:MultiReference property="UML:Property:redefinedProperty"
+ input="{Binding}"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt
index e9f4f5a63bc..e976767f289 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleStructuralFeature.xwt
@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang"
- 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="http://www.eclipse.org/xwt/presentation" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ 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="http://www.eclipse.org/xwt/presentation" xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:StructuralFeature:isReadOnly"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Feature:isStatic"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt
index 3e3509ba44a..58b9df65971 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleValuePin.xwt
@@ -1,54 +1,54 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
- xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}"
- property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
- <ppe:ReferenceDialog input="{Binding}" property="UML:ValuePin:value"></ppe:ReferenceDialog>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:j="clr-namespace:java.lang" xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}" property="UML:Pin:isControl"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:ObjectNode:isControlType"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:RedefinableElement:isLeaf"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:ObjectNode:ordering"></ppe:EnumCombo>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:selection"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:TypedElement:type"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}"
+ property="UML:ObjectNode:upperBound"></ppe:ReferenceDialog>
+ <ppe:ReferenceDialog input="{Binding}" property="UML:ValuePin:value"></ppe:ReferenceDialog>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:MultiReference input="{Binding}" property="UML:ObjectNode:inState"></ppe:MultiReference>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt
index c8d94261fd5..e09d846257d 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/Model/UML/ui/SingleVariable.xwt
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite xmlns:j="clr-namespace:java.lang"
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
- <ppe:BooleanRadio input="{Binding}"
- property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
- </Composite>
- <Composite>
- <Composite.layout>
- <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
- </Composite.layout>
- <ppe:StringCombo input="{Binding}" property="Multiplicity:multiplicity"></ppe:StringCombo>
- <ppe:ReferenceDialog property="UML:TypedElement:type"
- input="{Binding}"></ppe:ReferenceDialog>
- </Composite>
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns:j="clr-namespace:java.lang"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:StringEditor input="{Binding}" property="UML:NamedElement:name"></ppe:StringEditor>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isOrdered"></ppe:BooleanRadio>
+ <ppe:BooleanRadio input="{Binding}"
+ property="UML:MultiplicityElement:isUnique"></ppe:BooleanRadio>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <ppe:EnumCombo input="{Binding}" property="UML:NamedElement:visibility"></ppe:EnumCombo>
+ </Composite>
+ <Composite>
+ <Composite.layout>
+ <ppel:PropertiesLayout numColumns="2"></ppel:PropertiesLayout>
+ </Composite.layout>
+ <uml:MultiplicityDialog input="{Binding}" property="Multiplicity:multiplicity"></uml:MultiplicityDialog>
+ <ppe:ReferenceDialog property="UML:TypedElement:type"
+ input="{Binding}"></ppe:ReferenceDialog>
+ </Composite>
</Composite> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/plugin.xml b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/plugin.xml
index b0e3d898804..a53b2901f09 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/plugin.xml
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/plugin.xml
@@ -1,81 +1,96 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?eclipse version="3.4"?>
-
-<plugin>
- <extension-point id="org.eclipse.papyrus.uml.properties.languageEditor" name="%extension-point.name" schema="schema/org.eclipse.papyrus.uml.properties.languageEditor.exsd"/>
- <extension-point id="org.eclipse.papyrus.uml.properties.datatype" name="DataType" schema="schema/org.eclipse.papyrus.uml.properties.datatype.exsd"/>
- <extension point="org.eclipse.papyrus.views.properties.environment">
- <environment environmentModel="Model/Environment.xmi">
- </environment>
- </extension>
- <extension point="org.eclipse.papyrus.views.properties.context">
- <context contextModel="Model/UML/UML.ctx">
- </context>
- </extension>
- <extension
- point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
- <propertyContributor
- contributorId="TreeOutlinePage"
- labelProvider="org.eclipse.papyrus.views.properties.providers.PropertiesHeaderLabelProvider"
- tabDescriptorProvider="org.eclipse.papyrus.views.properties.xwt.XWTTabDescriptorProvider">
- <propertyCategory
- category="org.eclipse.papyrus"></propertyCategory>
- </propertyContributor>
- </extension>
- <extension point="org.eclipse.emf.ecore.uri_mapping">
- <mapping source="pathmap://UML_CONTEXT/" target="platform:/plugin/org.eclipse.papyrus.views.properties.uml/Model/UML/">
- </mapping>
- </extension>
- <extension point="org.eclipse.papyrus.uml.properties.languageEditor">
- <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor">
- </editor>
- <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="C">
- </editor>
- <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="C++">
- </editor>
- <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="JAVA">
- </editor>
- <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="Natural language">
- </editor>
- </extension>
- <extension point="org.eclipse.papyrus.views.properties.context">
- <context contextModel="Model/UMLNotation/UMLNotation.ctx">
- </context>
- </extension>
-
- <!-- TODO EMF-FACET
- <extension
- point="org.eclipse.papyrus.emf.facet.infra.query.registration">
- <modelqueryset
- file="Model/UML/uml.querySet">
- </modelqueryset>
- </extension-->
- <extension
- point="org.eclipse.papyrus.views.properties.labelprovider">
- <labelProvider
- labelProvider="org.eclipse.papyrus.uml.tools.providers.UMLFilteredLabelProvider"
- priority="50">
- </labelProvider>
- <labelProvider
- labelProvider="org.eclipse.papyrus.uml.profile.providers.AppliedStereotypePropertyFilteredLabelProvider"
- priority="45">
- </labelProvider>
- </extension>
-
- <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
- <propertyTabs
- contributorId="TreeOutlinePage">
- <propertyTab id="Base" label="General" category="org.eclipse.papyrus" afterTab=""/>
- <propertyTab id="Comments" label="Comments" category="org.eclipse.papyrus" afterTab="Base"/>
- <propertyTab id="advanced" label="Advanced" category="org.eclipse.papyrus" afterTab="Comments"/>
- </propertyTabs>
- </extension>
- <extension
- point="org.eclipse.emf.ecore.generated_package">
- <package
- class="org.eclipse.papyrus.uml.properties.languagepreferences.languagepreferencesPackage"
- genModel="Model/LanguagePreferences.genmodel"
- uri="http://www.eclipse.org/papyrus/properties/uml/languagePreferences">
- </package>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse version="3.4"?>
+
+<plugin>
+ <extension-point id="org.eclipse.papyrus.uml.properties.languageEditor" name="%extension-point.name" schema="schema/org.eclipse.papyrus.uml.properties.languageEditor.exsd"/>
+ <extension-point id="org.eclipse.papyrus.uml.properties.datatype" name="DataType" schema="schema/org.eclipse.papyrus.uml.properties.datatype.exsd"/>
+ <extension point="org.eclipse.papyrus.views.properties.environment">
+ <environment environmentModel="Model/Environment.xmi">
+ </environment>
</extension>
-</plugin>
+ <extension point="org.eclipse.papyrus.views.properties.context">
+ <context contextModel="Model/UML/UML.ctx">
+ </context>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
+ <propertyContributor
+ contributorId="TreeOutlinePage"
+ labelProvider="org.eclipse.papyrus.views.properties.providers.PropertiesHeaderLabelProvider"
+ tabDescriptorProvider="org.eclipse.papyrus.views.properties.xwt.XWTTabDescriptorProvider">
+ <propertyCategory
+ category="org.eclipse.papyrus"></propertyCategory>
+ </propertyContributor>
+ </extension>
+ <extension point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping source="pathmap://UML_CONTEXT/" target="platform:/plugin/org.eclipse.papyrus.views.properties.uml/Model/UML/">
+ </mapping>
+ </extension>
+ <extension point="org.eclipse.papyrus.uml.properties.languageEditor">
+ <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor">
+ </editor>
+ <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="C">
+ </editor>
+ <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="C++">
+ </editor>
+ <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="JAVA">
+ </editor>
+ <editor editor="org.eclipse.papyrus.uml.properties.widgets.NaturalLanguageEditor" language="Natural language">
+ </editor>
+ </extension>
+ <extension point="org.eclipse.papyrus.views.properties.context">
+ <context contextModel="Model/UMLNotation/UMLNotation.ctx">
+ </context>
+ </extension>
+
+ <!-- TODO EMF-FACET
+ <extension
+ point="org.eclipse.papyrus.emf.facet.infra.query.registration">
+ <modelqueryset
+ file="Model/UML/uml.querySet">
+ </modelqueryset>
+ </extension-->
+ <extension
+ point="org.eclipse.papyrus.views.properties.labelprovider">
+ <labelProvider
+ labelProvider="org.eclipse.papyrus.uml.tools.providers.UMLFilteredLabelProvider"
+ priority="50">
+ </labelProvider>
+ <labelProvider
+ labelProvider="org.eclipse.papyrus.uml.profile.providers.AppliedStereotypePropertyFilteredLabelProvider"
+ priority="45">
+ </labelProvider>
+ </extension>
+
+ <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
+ <propertyTabs
+ contributorId="TreeOutlinePage">
+ <propertyTab id="Base" label="General" category="org.eclipse.papyrus" afterTab=""/>
+ <propertyTab id="Comments" label="Comments" category="org.eclipse.papyrus" afterTab="Base"/>
+ <propertyTab id="advanced" label="Advanced" category="org.eclipse.papyrus" afterTab="Comments"/>
+ </propertyTabs>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.generated_package">
+ <package
+ class="org.eclipse.papyrus.uml.properties.languagepreferences.languagepreferencesPackage"
+ genModel="Model/LanguagePreferences.genmodel"
+ uri="http://www.eclipse.org/papyrus/properties/uml/languagePreferences">
+ </package>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.views.properties.propertyview"
+ class="org.eclipse.papyrus.uml.properties.preferences.MultiplicityEditorPreferencePage"
+ id="org.eclipse.papyrus.uml.properties.multiplicityEditorProperties"
+ name="Multiplicity Editor">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.uml.properties.preferences.MultiplicityEditorPreferenceInitializer">
+ </initializer>
+ </extension>
+</plugin>
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/Messages.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/Messages.java
index e7dff13d42e..e6757d2ec5a 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/Messages.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/Messages.java
@@ -1,51 +1,63 @@
-/*****************************************************************************
- * Copyright (c) 2011 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.properties.messages.messages"; //$NON-NLS-1$
-
- public static String ExpressionLanguageFactory_EditLanguage;
-
- public static String ExpressionLanguageFactory_LanguageDuplicateError;
-
- public static String ExpressionLanguageFactory_SetNewLanguage;
-
- public static String UMLNotationModelElement_DepthFull;
-
- public static String UMLNotationModelElement_DepthNone;
-
- public static String ExpressionEditor_BodyLabel;
-
- public static String ProfileApplicationEditor_ApplyProfile;
-
- public static String ProfileApplicationEditor_ApplyProfilesDialogDescription;
-
- public static String ProfileApplicationEditor_ApplyProfilesDialogTitle;
-
- public static String ProfileApplicationEditor_ApplyRegisteredProfile;
-
- public static String ProfileApplicationEditor_WaitMessage;
-
- public static String ProfileApplicationEditor_WaitMessageTitle;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2011 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.properties.messages.messages"; //$NON-NLS-1$
+
+ public static String ExpressionLanguageFactory_EditLanguage;
+
+ public static String ExpressionLanguageFactory_LanguageDuplicateError;
+
+ public static String ExpressionLanguageFactory_SetNewLanguage;
+
+ public static String UMLNotationModelElement_DepthFull;
+
+ public static String UMLNotationModelElement_DepthNone;
+
+ public static String ExpressionEditor_BodyLabel;
+
+ public static String ProfileApplicationEditor_ApplyProfile;
+
+ public static String ProfileApplicationEditor_ApplyProfilesDialogDescription;
+
+ public static String ProfileApplicationEditor_ApplyProfilesDialogTitle;
+
+ public static String ProfileApplicationEditor_ApplyRegisteredProfile;
+
+ public static String ProfileApplicationEditor_WaitMessage;
+
+ public static String ProfileApplicationEditor_WaitMessageTitle;
+
+ /** The multiplicity Editor string text label. */
+ public static String MultiplicityPreference_MultiplicityEditor;
+
+ /** The simple mode description. */
+ public static String MultiplicityPreference_SimpleModeDescription;
+
+ /** The advanced mode description. */
+ public static String MultiplicityPreference_AdvancedModeDescription;
+
+ /** The multiplicity Editor string text label. */
+ public static String MultiplicityPreference_fieldEditorMode;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/messages.properties b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/messages.properties
index b2662df2674..886eded98a1 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/messages.properties
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/messages/messages.properties
@@ -1,12 +1,16 @@
-ExpressionEditor_BodyLabel=Body
-ProfileApplicationEditor_ApplyProfile=Apply profile
-ProfileApplicationEditor_ApplyProfilesDialogDescription=Choose profiles to apply
-ProfileApplicationEditor_ApplyProfilesDialogTitle=Apply Profiles...
-ProfileApplicationEditor_ApplyRegisteredProfile=Apply registered profile
-ProfileApplicationEditor_WaitMessage=Applying profile...
-ProfileApplicationEditor_WaitMessageTitle=Profile application
-UMLNotationModelElement_DepthFull=Full
-UMLNotationModelElement_DepthNone=None
-ExpressionLanguageFactory_EditLanguage=Edit language
-ExpressionLanguageFactory_LanguageDuplicateError=The same language cannot be used more than once
-ExpressionLanguageFactory_SetNewLanguage=Set the new language
+ExpressionEditor_BodyLabel=Body
+ProfileApplicationEditor_ApplyProfile=Apply profile
+ProfileApplicationEditor_ApplyProfilesDialogDescription=Choose profiles to apply
+ProfileApplicationEditor_ApplyProfilesDialogTitle=Apply Profiles...
+ProfileApplicationEditor_ApplyRegisteredProfile=Apply registered profile
+ProfileApplicationEditor_WaitMessage=Applying profile...
+ProfileApplicationEditor_WaitMessageTitle=Profile application
+UMLNotationModelElement_DepthFull=Full
+UMLNotationModelElement_DepthNone=None
+ExpressionLanguageFactory_EditLanguage=Edit language
+ExpressionLanguageFactory_LanguageDuplicateError=The same language cannot be used more than once
+ExpressionLanguageFactory_SetNewLanguage=Set the new language
+MultiplicityPreference_MultiplicityEditor=Multiplicity Editor
+MultiplicityPreference_SimpleModeDescription= is the edition of lower and upper values by one editor.
+MultiplicityPreference_AdvancedModeDescription= is the edition of lower and upper values by two editors.
+MultiplicityPreference_fieldEditorMode=Multiplicity editor mode
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/MemberEndModelElement.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/MemberEndModelElement.java
index e94aa1a07ea..94a59097200 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/MemberEndModelElement.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/modelelement/MemberEndModelElement.java
@@ -1,142 +1,142 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - bug 323802
- * Christian W. Damus (CEA) - bug 417409
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.properties.modelelement;
-
-import static org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue.ASSOCIATION;
-import static org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue.CLASSIFIER;
-import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ANY;
-import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ONE;
-import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ONE_OR_MORE;
-import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.OPTIONAL;
-
-import java.util.List;
-
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
-import org.eclipse.papyrus.infra.widgets.providers.StaticContentProvider;
-import org.eclipse.papyrus.uml.properties.Activator;
-import org.eclipse.papyrus.uml.tools.databinding.ExtensionEndMultiplicityObservableValue;
-import org.eclipse.papyrus.uml.tools.databinding.MultiplicityObservableValue;
-import org.eclipse.papyrus.uml.tools.databinding.NavigationObservableValue;
-import org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue;
-import org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement;
-import org.eclipse.uml2.uml.ExtensionEnd;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * A Model Element for manipulating MemberEnd properties
- *
- * @author Camille Letavernier
- */
-public class MemberEndModelElement extends AbstractModelElement {
-
- protected EObject source;
-
- protected EditingDomain domain;
-
- /**
- * The "multiplicity" virtual property
- */
- public static final String MULTIPLICITY = "multiplicity"; //$NON-NLS-1$
-
- /**
- * The "owner" virtual property
- */
- public static final String OWNER = "owner"; //$NON-NLS-1$
-
- /**
- * The "navigable" virtual property
- */
- public static final String NAVIGABLE = "navigable"; //$NON-NLS-1$
-
- /**
- *
- * Constructor.
- *
- * @param source
- * The EObject being edited
- * @param domain
- * The Editing domain on which the commands will be executed
- */
- public MemberEndModelElement(EObject source, EditingDomain domain) {
- this.source = source;
- this.domain = domain;
- }
-
- @Override
- public IObservable doGetObservable(String propertyPath) {
- if (propertyPath.equals(MULTIPLICITY)) {
- if (source instanceof ExtensionEnd) {
- return new ExtensionEndMultiplicityObservableValue((ExtensionEnd) source, domain);
- }
- return new MultiplicityObservableValue(source, domain);
- } else if (propertyPath.equals(OWNER)) {
- return new OwnerObservableValue(source, domain);
- } else if (propertyPath.equals(NAVIGABLE)) {
- return new NavigationObservableValue(source, domain);
- }
- Activator.log.warn("The property " + propertyPath + " doesn't exist"); //$NON-NLS-1$ //$NON-NLS-2$
- return null;
- }
-
- @Override
- public IStaticContentProvider getContentProvider(String propertyPath) {
- if (propertyPath.equals(MULTIPLICITY)) {
- if (source instanceof ExtensionEnd) {
- return new StaticContentProvider(new String[] { ONE, OPTIONAL });
- }
- return new StaticContentProvider(new String[] { ANY, ONE_OR_MORE, OPTIONAL, ONE });
- } else if (propertyPath.equals(OWNER)) {
- return new StaticContentProvider(new String[] { ASSOCIATION, CLASSIFIER });
- }
- return super.getContentProvider(propertyPath);
- }
-
- @Override
- public boolean isMandatory(String propertyPath) {
- return true;
- }
-
- @Override
- public boolean isEditable(String propertyPath) {
- if (propertyPath.equals(OWNER)) {
- List<Property> memberEnds = ((Property) source).getAssociation().getMemberEnds();
- if (memberEnds.size() == 2) {
- // Association between two associations : this doesn't make sense ?
- if (isAssociation(memberEnds.get(0)) && isAssociation(memberEnds.get(1))) {
- return false;
- }
- }
- return (((Property) source).getAssociation().getMemberEnds().size() <= 2) && !EMFHelper.isReadOnly(source);
- }
- return !EMFHelper.isReadOnly(source);
- }
-
- private boolean isAssociation(Property property) {
- if (property.getType() == null) {
- return false;
- }
- return property.getType().eClass() == UMLPackage.eINSTANCE.getAssociation();
- }
-
- @Override
- public boolean forceRefresh(String propertyPath) {
- return propertyPath.equals(NAVIGABLE) || propertyPath.equals(OWNER);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 323802
+ * Christian W. Damus (CEA) - bug 417409
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.modelelement;
+
+import static org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue.ASSOCIATION;
+import static org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue.CLASSIFIER;
+import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ANY;
+import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ONE;
+import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.ONE_OR_MORE;
+import static org.eclipse.papyrus.uml.tools.util.MultiplicityParser.OPTIONAL;
+
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.StaticContentProvider;
+import org.eclipse.papyrus.uml.properties.Activator;
+import org.eclipse.papyrus.uml.tools.databinding.ExtendedMultiplicityObservableValue;
+import org.eclipse.papyrus.uml.tools.databinding.ExtensionEndMultiplicityObservableValue;
+import org.eclipse.papyrus.uml.tools.databinding.NavigationObservableValue;
+import org.eclipse.papyrus.uml.tools.databinding.OwnerObservableValue;
+import org.eclipse.papyrus.views.properties.modelelement.AbstractModelElement;
+import org.eclipse.uml2.uml.ExtensionEnd;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A Model Element for manipulating MemberEnd properties
+ *
+ * @author Camille Letavernier
+ */
+public class MemberEndModelElement extends AbstractModelElement {
+
+ protected EObject source;
+
+ protected EditingDomain domain;
+
+ /**
+ * The "multiplicity" virtual property
+ */
+ public static final String MULTIPLICITY = "multiplicity"; //$NON-NLS-1$
+
+ /**
+ * The "owner" virtual property
+ */
+ public static final String OWNER = "owner"; //$NON-NLS-1$
+
+ /**
+ * The "navigable" virtual property
+ */
+ public static final String NAVIGABLE = "navigable"; //$NON-NLS-1$
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param source
+ * The EObject being edited
+ * @param domain
+ * The Editing domain on which the commands will be executed
+ */
+ public MemberEndModelElement(EObject source, EditingDomain domain) {
+ this.source = source;
+ this.domain = domain;
+ }
+
+ @Override
+ public IObservable doGetObservable(String propertyPath) {
+ if (propertyPath.equals(MULTIPLICITY)) {
+ if (source instanceof ExtensionEnd) {
+ return new ExtensionEndMultiplicityObservableValue((ExtensionEnd) source, domain);
+ }
+ return new ExtendedMultiplicityObservableValue(source, domain);
+ } else if (propertyPath.equals(OWNER)) {
+ return new OwnerObservableValue(source, domain);
+ } else if (propertyPath.equals(NAVIGABLE)) {
+ return new NavigationObservableValue(source, domain);
+ }
+ Activator.log.warn("The property " + propertyPath + " doesn't exist"); //$NON-NLS-1$ //$NON-NLS-2$
+ return null;
+ }
+
+ @Override
+ public IStaticContentProvider getContentProvider(String propertyPath) {
+ if (propertyPath.equals(MULTIPLICITY)) {
+ if (source instanceof ExtensionEnd) {
+ return new StaticContentProvider(new String[] { ONE, OPTIONAL });
+ }
+ return new StaticContentProvider(new String[] { ANY, ONE_OR_MORE, OPTIONAL, ONE });
+ } else if (propertyPath.equals(OWNER)) {
+ return new StaticContentProvider(new String[] { ASSOCIATION, CLASSIFIER });
+ }
+ return super.getContentProvider(propertyPath);
+ }
+
+ @Override
+ public boolean isMandatory(String propertyPath) {
+ return true;
+ }
+
+ @Override
+ public boolean isEditable(String propertyPath) {
+ if (propertyPath.equals(OWNER)) {
+ List<Property> memberEnds = ((Property) source).getAssociation().getMemberEnds();
+ if (memberEnds.size() == 2) {
+ // Association between two associations : this doesn't make sense ?
+ if (isAssociation(memberEnds.get(0)) && isAssociation(memberEnds.get(1))) {
+ return false;
+ }
+ }
+ return (((Property) source).getAssociation().getMemberEnds().size() <= 2) && !EMFHelper.isReadOnly(source);
+ }
+ return !EMFHelper.isReadOnly(source);
+ }
+
+ private boolean isAssociation(Property property) {
+ if (property.getType() == null) {
+ return false;
+ }
+ return property.getType().eClass() == UMLPackage.eINSTANCE.getAssociation();
+ }
+
+ @Override
+ public boolean forceRefresh(String propertyPath) {
+ return propertyPath.equals(NAVIGABLE) || propertyPath.equals(OWNER);
+ }
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferenceInitializer.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferenceInitializer.java
new file mode 100644
index 00000000000..dcf2bc4838f
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferenceInitializer.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.widgets.util.MultiplicityConstants;
+
+/**
+ * This class allow to define the multiplicity preference initialization.
+ */
+public class MultiplicityEditorPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityEditorPreferenceInitializer() {
+ // Nothing
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
+ */
+ @Override
+ public void initializeDefaultPreferences() {
+ final IPreferenceStore store = MultiplicityEditorPreferences.instance.getPreferenceStore();
+ store.setDefault(MultiplicityConstants.MULTIPLICITY_EDITOR_MODE, MultiplicityConstants.SIMPLE_MODE);
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferencePage.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferencePage.java
new file mode 100644
index 00000000000..95363eb903e
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferencePage.java
@@ -0,0 +1,91 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.preferences;
+
+import org.eclipse.jface.preference.ComboFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.papyrus.infra.widgets.util.MultiplicityConstants;
+import org.eclipse.papyrus.uml.properties.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * This class define the multiplicity editor preference page.
+ */
+public class MultiplicityEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ /**
+ * Initialize the preference page.
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ *
+ * @param workbench
+ * The current workbench.
+ */
+ public void init(final IWorkbench workbench) {
+ setPreferenceStore(MultiplicityEditorPreferences.instance.getPreferenceStore());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(final Composite parent) {
+
+ // Create the group for the multiplicity editor
+ final Group multiplicityEditorGroup = new Group(parent, SWT.NONE);
+ multiplicityEditorGroup.setText(Messages.MultiplicityPreference_MultiplicityEditor);
+ multiplicityEditorGroup.setLayout(new GridLayout(1, true));
+ multiplicityEditorGroup.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+
+ // Create the parent contents
+ super.createContents(multiplicityEditorGroup);
+
+ // Create the label description
+ final Label descriptionLabel = new Label(multiplicityEditorGroup, SWT.NONE);
+ descriptionLabel.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
+ StringBuilder description = new StringBuilder();
+ description.append("\""); //$NON-NLS-1$
+ description.append(MultiplicityConstants.SIMPLE_MODE_TEXT_VALUE);
+ description.append(Messages.MultiplicityPreference_SimpleModeDescription);
+ description.append("\n\""); //$NON-NLS-1$
+ description.append(MultiplicityConstants.ADVANCED_MODE_TEXT_VALUE);
+ description.append(Messages.MultiplicityPreference_AdvancedModeDescription);
+ descriptionLabel.setText(description.toString());
+
+ return multiplicityEditorGroup;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
+ */
+ @Override
+ protected void createFieldEditors() {
+
+ final String[][] values = { { MultiplicityConstants.SIMPLE_MODE_TEXT_VALUE, MultiplicityConstants.SIMPLE_MODE }, { MultiplicityConstants.ADVANCED_MODE_TEXT_VALUE, MultiplicityConstants.ADVANCED_MODE } };
+ final ComboFieldEditor fieldEditor = new ComboFieldEditor(MultiplicityConstants.MULTIPLICITY_EDITOR_MODE, Messages.MultiplicityPreference_fieldEditorMode, values, getFieldEditorParent());
+ addField(fieldEditor);
+ }
+
+} \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferences.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferences.java
new file mode 100644
index 00000000000..4eff8d0ba9f
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/preferences/MultiplicityEditorPreferences.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.preferences;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.Activator;
+
+/**
+ * This class define the constants and the preference store for the multiplicity editor in properties view.
+ */
+public class MultiplicityEditorPreferences {
+
+ /**
+ * Instance singleton.
+ */
+ public static final MultiplicityEditorPreferences instance = new MultiplicityEditorPreferences();
+
+
+ /**
+ * The preference store.
+ */
+ private IPreferenceStore preferences = Activator.getInstance().getPreferenceStore();
+
+
+ /**
+ * Constructor.
+ */
+ private MultiplicityEditorPreferences() {
+ // Nothing
+ }
+
+ /**
+ * Gets the preference store.
+ *
+ * @return The preference store.
+ */
+ public IPreferenceStore getPreferenceStore() {
+ return preferences;
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ExtendedMultiplicityDialog.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ExtendedMultiplicityDialog.java
new file mode 100644
index 00000000000..54339f35420
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ExtendedMultiplicityDialog.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.widgets;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+
+/**
+ * The extended multiplicity dialog which allow to redefine the {@link #canEditStringCombo()} method dependent of lower and upper ValueSpecification type.
+ */
+public class ExtendedMultiplicityDialog extends MultiplicityDialog {
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ */
+ public ExtendedMultiplicityDialog(final Composite parent, final int style) {
+ this(parent, style, null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The parent composite.
+ * @param style
+ * The style.
+ * @param preferenceStore
+ * The preference store.
+ */
+ public ExtendedMultiplicityDialog(final Composite parent, final int style, final IPreferenceStore preferenceStore) {
+ super(parent, style, preferenceStore);
+ }
+
+ /**
+ * Redefine this method to manage the lower and upper ValueSpecification type. {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog#canEditStringCombo()
+ */
+ @Override
+ protected boolean canEditStringCombo() {
+ boolean result = super.canEditStringCombo();
+ if (null != lowerValueEditor.getValue()) {
+ if (!(lowerValueEditor.getValue() instanceof LiteralInteger)) {
+ result = false;
+ }
+ }
+
+ if (null != upperValueEditor.getValue()) {
+ if (!(upperValueEditor.getValue() instanceof LiteralUnlimitedNatural)) {
+ result = false;
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/MultiplicityDialog.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/MultiplicityDialog.java
new file mode 100644
index 00000000000..bdb3a12f69a
--- /dev/null
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/MultiplicityDialog.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.properties.widgets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.papyrus.infra.widgets.creation.ReferenceValueFactory;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.eclipse.papyrus.uml.properties.preferences.MultiplicityEditorPreferences;
+import org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * The multiplicity dialog for the properties view.
+ */
+public class MultiplicityDialog extends AbstractPropertyEditor {
+
+ /**
+ * The multiplicity lower value property path.
+ */
+ private static final String MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH = "UML:MultiplicityElement:lowerValue"; //$NON-NLS-1$
+
+ /**
+ * The multiplicity upper value property path.
+ */
+ private static final String MULTIPLICITY_UPPER_VALUE_UML_PROPERTY_PATH = "UML:MultiplicityElement:upperValue"; //$NON-NLS-1$
+
+ /**
+ * The number of properties path used.
+ */
+ private static final int NuMBER_PROPERTIES_PATH = 3;
+
+
+ /**
+ * The ValueFactory used to create or edit Objects directly from this editor.
+ */
+ protected ReferenceValueFactory factory;
+
+ /**
+ * The MultiplicityReferenceDialog widget.
+ */
+ protected org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog editor;
+
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ */
+ public MultiplicityDialog(final Composite parent, final int style) {
+ setEditor(createMultiplicityDialog(parent, style));
+ }
+
+ /**
+ * Creates the multiplicity dialog.
+ *
+ * @param parent
+ * The composite in which the widget will be displayed.
+ * @param style
+ * The style for the widget.
+ * @return The reference dialog.
+ */
+ protected org.eclipse.papyrus.infra.widgets.editors.MultiplicityDialog createMultiplicityDialog(
+ final Composite parent, final int style) {
+ return editor = new ExtendedMultiplicityDialog(parent, style, MultiplicityEditorPreferences.instance.getPreferenceStore());
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor#doBinding()
+ */
+ @Override
+ protected void doBinding() {
+ // Create the content providers for each editor
+ final List<IStaticContentProvider> contentProviders = new ArrayList<IStaticContentProvider>(NuMBER_PROPERTIES_PATH);
+ contentProviders.add(input.getContentProvider(propertyPath));
+ contentProviders.add(input.getContentProvider(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ contentProviders.add(input.getContentProvider(MULTIPLICITY_UPPER_VALUE_UML_PROPERTY_PATH));
+ editor.setContentProviders(contentProviders);
+
+ // Create the label providers for each editor
+ final List<ILabelProvider> labelProviders = new ArrayList<ILabelProvider>(NuMBER_PROPERTIES_PATH);
+ labelProviders.add(input.getLabelProvider(propertyPath));
+ labelProviders.add(input.getLabelProvider(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ labelProviders.add(input.getLabelProvider(MULTIPLICITY_UPPER_VALUE_UML_PROPERTY_PATH));
+ editor.setLabelProviders(labelProviders);
+
+ editor.setDirectCreation(input.getDirectCreation(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ editor.setMandatory(input.isMandatory(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+
+ final List<ReferenceValueFactory> factories = new ArrayList<ReferenceValueFactory>(NuMBER_PROPERTIES_PATH);
+ if (null == factory) {
+ // Use the default factory from the DataSource
+ factories.add(input.getValueFactory(propertyPath));
+ } else {
+ // Use the factory explicitly specified
+ factories.add(factory);
+ }
+ factories.add(input.getValueFactory(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ factories.add(input.getValueFactory(MULTIPLICITY_UPPER_VALUE_UML_PROPERTY_PATH));
+ editor.setValueFactories(factories);
+
+ super.doBinding();
+ }
+
+ /**
+ * Sets the ValueFactory used to create or edit Objects directly from this editor.
+ *
+ * @param factory
+ * The reference value factory.
+ */
+ public void setFactory(final ReferenceValueFactory factory) {
+ this.factory = factory;
+ final List<ReferenceValueFactory> factories = new ArrayList<ReferenceValueFactory>(NuMBER_PROPERTIES_PATH);
+ factories.add(factory);
+ factories.add(input.getValueFactory(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ factories.add(input.getValueFactory(MULTIPLICITY_LOWER_VALUE_UML_PROPERTY_PATH));
+ editor.setValueFactories(factories);
+ }
+
+ /**
+ * Get the factory.
+ *
+ * @return The ValueFactory used to create or edit Objects directly from
+ * this editor.
+ */
+ public ReferenceValueFactory getFactory() {
+ return factory;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml
index 7e54fcea8eb..5e17171b317 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/plugin.xml
@@ -354,6 +354,32 @@
name="Lowest">
</Priority>
</DirectEditor>
+ <DirectEditor
+ additionalConstraint="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.constraint.MultiplicityLowerValueDirectEditorConstraint"
+ contributor="CEA LIST"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecification.gif"
+ language="Advanced Value Specification Textual Editor"
+ objectToEdit="org.eclipse.uml2.uml.ValueSpecification">
+ <popupeditor
+ editorConfiguration="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration">
+ </popupeditor>
+ <Priority
+ name="Low">
+ </Priority>
+ </DirectEditor>
+ <DirectEditor
+ additionalConstraint="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.constraint.MultiplicityUpperValueDirectEditorConstraint"
+ contributor="CEA LIST"
+ icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ValueSpecification.gif"
+ language="Advanced Value Specification Textual Editor"
+ objectToEdit="org.eclipse.uml2.uml.ValueSpecification">
+ <popupeditor
+ editorConfiguration="org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration">
+ </popupeditor>
+ <Priority
+ name="Low">
+ </Priority>
+ </DirectEditor>
</extension>
</plugin>
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityLowerValueDirectEditorConstraint.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityLowerValueDirectEditorConstraint.java
new file mode 100644
index 00000000000..8fb295e862b
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityLowerValueDirectEditorConstraint.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.constraint;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * This class allow to define a constraint corresponding to the multiplicity lower value.
+ */
+public class MultiplicityLowerValueDirectEditorConstraint implements IDirectEditorConstraint {
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityLowerValueDirectEditorConstraint() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint#getLabel()
+ *
+ * @return The label.
+ */
+ public String getLabel() {
+ return " Multiplicity Element Lower Value"; //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint#appliesTo(java.lang.Object)
+ *
+ * @param selection
+ * the current selection
+ * @return <code>true</code> if selection matches the constraint, otherwise <code>false</code>
+ */
+ public boolean appliesTo(final Object selection) {
+ boolean appliedConstraint = false;
+ // Check that the selection is a structural feature and the lower value of multiplicity element
+ if (selection instanceof EStructuralFeature && UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(selection)) {
+ appliedConstraint = true;
+ } else if (selection instanceof ValueSpecification) {
+ final ValueSpecification valueSpecification = (ValueSpecification) selection;
+ if (valueSpecification.eContainer() instanceof MultiplicityElement) {
+ final EObject parent = valueSpecification.eContainer();
+ final Object lowerValue = parent.eGet(UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue());
+ appliedConstraint = valueSpecification.equals(lowerValue);
+ }
+ }
+ return appliedConstraint;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java
new file mode 100644
index 00000000000..2a848b74854
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.constraint;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * This class allow to define a constraint corresponding to the multiplicity upper value.
+ */
+public class MultiplicityUpperValueDirectEditorConstraint implements IDirectEditorConstraint {
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityUpperValueDirectEditorConstraint() {
+ super();
+ }
+
+ /**
+ * @see org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint#getLabel()
+ *
+ * @return The label.
+ */
+ public String getLabel() {
+ return " Multiplicity Element Upper Value"; //$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConstraint#appliesTo(java.lang.Object)
+ *
+ * @param selection
+ * the current selection
+ * @return <code>true</code> if selection matches the constraint, otherwise <code>false</code>
+ */
+ public boolean appliesTo(final Object selection) {
+ boolean appliedConstraint = false;
+ // Check that the selection is a structural feature and the lower value of multiplicity element
+ if (selection instanceof EStructuralFeature && UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(selection)) {
+ appliedConstraint = true;
+ } else if (selection instanceof ValueSpecification) {
+ final ValueSpecification valueSpecification = (ValueSpecification) selection;
+ if (valueSpecification.eContainer() instanceof MultiplicityElement) {
+ final EObject parent = valueSpecification.eContainer();
+ final Object upperValue = parent.eGet(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue());
+ appliedConstraint = upperValue.equals(valueSpecification);
+ }
+ }
+ return appliedConstraint;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration.java
new file mode 100644
index 00000000000..1a15d2c08a9
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.MultiplicityLowerValueSetCommand;
+
+/**
+ * This class allow to define a direct editor configuration for the multiplicity lower value (with allow to redefine the set command for the specific integer value.
+ */
+public class MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration extends ValueSpecificationXtextDirectEditorConfiguration {
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration#getParseCommand(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected ICommand getParseCommand(final EObject initialValue, final EObject xtextObject) {
+ ICommand result = null;
+ if (objectToEdit instanceof EObject && null != structuralFeature) {
+ // If the xtext object is not null, that means the xtext was already parsed
+ if (null == xtextObject) {
+ result = MultiplicityLowerValueSetCommand.getInstance().createSetCommand(getInjector(), (EObject) objectToEdit, structuralFeature, xtextStringValue, getDefaultLanguages());
+ } else {
+ result = MultiplicityLowerValueSetCommand.getInstance().getParseCommand((EObject) objectToEdit, structuralFeature, xtextObject, xtextStringValue, getDefaultLanguages());
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration.java
new file mode 100644
index 00000000000..0094a987bd6
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.MultiplicityUpperValueSetCommand;
+
+/**
+ * This class allow to define a direct editor configuration for the multiplicity upper value (with allow to redefine the set command for the specific integer value.
+ */
+public class MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration extends ValueSpecificationXtextDirectEditorConfiguration {
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration#getParseCommand(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)
+ */
+ @Override
+ protected ICommand getParseCommand(final EObject initialValue, final EObject xtextObject) {
+ ICommand result = null;
+ if (objectToEdit instanceof EObject && null != structuralFeature) {
+ // If the xtext object is not null, that means the xtext was already parsed
+ if (null == xtextObject) {
+ result = MultiplicityUpperValueSetCommand.getInstance().createSetCommand(getInjector(), (EObject) objectToEdit, structuralFeature, xtextStringValue, getDefaultLanguages());
+ } else {
+ result = MultiplicityUpperValueSetCommand.getInstance().getParseCommand((EObject) objectToEdit, structuralFeature, xtextObject, xtextStringValue, getDefaultLanguages());
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java
index 4a403ff51ec..631e826ebfe 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/contribution/ValueSpecificationXtextDirectEditorConfiguration.java
@@ -45,12 +45,12 @@ public class ValueSpecificationXtextDirectEditorConfiguration extends DefaultXte
/**
* The xtext string value.
*/
- private String xtextStringValue = ""; //$NON-NLS-1$
+ protected String xtextStringValue = ""; //$NON-NLS-1$
/**
* The structural feature to edit.
*/
- private EStructuralFeature structuralFeature = null;
+ protected EStructuralFeature structuralFeature = null;
/**
* {@inheritDoc}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/AbstractMultiplicityValueSpecificationSetCommand.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/AbstractMultiplicityValueSpecificationSetCommand.java
new file mode 100644
index 00000000000..a4a41de2393
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/AbstractMultiplicityValueSpecificationSetCommand.java
@@ -0,0 +1,110 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralNull;
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * This abstract class allow to define the method {@link #getObjectToUpdate(EObject, ValueSpecification, EObject)} for the multiplicity lower and upper value.
+ */
+public abstract class AbstractMultiplicityValueSpecificationSetCommand extends ValueSpecificationSetCommand {
+
+ /**
+ * Constructor.
+ */
+ public AbstractMultiplicityValueSpecificationSetCommand() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand#getParseCommand(org.eclipse.emf.ecore.EObject, org.eclipse.uml2.uml.ValueSpecification, org.eclipse.emf.ecore.EStructuralFeature,
+ * org.eclipse.emf.ecore.EObject, java.lang.String, java.util.Collection)
+ */
+ protected ICommand getParseCommand(final EObject objectToEdit,
+ final ValueSpecification initialValueSpecification,
+ final EStructuralFeature structuralFeature,
+ final EObject xtextObject, final String xtextStringValue,
+ final Collection<String> defaultLanguages) {
+
+ // Check if the object to edit is not multi-valued
+ if (null != objectToEdit) {
+ return manageValueSpecification(objectToEdit, structuralFeature,
+ initialValueSpecification, xtextObject, xtextStringValue,
+ defaultLanguages);
+ } else {
+ // The object is multi-valued, create an opaque expression
+ return manageOpaqueExpression(
+ objectToEdit, structuralFeature, initialValueSpecification, xtextStringValue,
+ defaultLanguages);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand#getObjectToUpdate(org.eclipse.emf.ecore.EObject, org.eclipse.uml2.uml.ValueSpecification, org.eclipse.emf.ecore.EObject)
+ */
+ protected ValueSpecification getObjectToUpdate(final EObject objectToEdit, final ValueSpecification initialValueSpecification, final EObject xtextObject) {
+ ValueSpecification result = null;
+ if (null != initialValueSpecification && null != xtextObject && xtextObject instanceof AbstractRule && null == ((AbstractRule) xtextObject).getUndefined()) {
+ final AbstractRule abstractRule = (AbstractRule) xtextObject;
+ if (initialValueSpecification instanceof InstanceValue && null != abstractRule.getInstanceSpecification()) {
+ result = (InstanceValue) initialValueSpecification;
+ } else {
+ final EObject xtextValue = abstractRule.getValue();
+ if (initialValueSpecification instanceof LiteralBoolean && xtextValue instanceof LiteralBooleanRule) {
+ result = (LiteralBoolean) initialValueSpecification;
+ } else if (initialValueSpecification instanceof LiteralInteger && xtextValue instanceof LiteralIntegerOrUnlimitedNaturalRule) {
+ if (null == ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue).getUnlimited()) {
+ result = (LiteralInteger) initialValueSpecification;
+ }
+ } else if (initialValueSpecification instanceof LiteralUnlimitedNatural && xtextValue instanceof LiteralIntegerOrUnlimitedNaturalRule) {
+ // Check that the value if positive for the unlimited natural type
+ final LiteralIntegerOrUnlimitedNaturalRule integerValue = ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue);
+ if (null != integerValue.getUnlimited() || 0 <= integerValue.getValue()) {
+ result = (LiteralUnlimitedNatural) initialValueSpecification;
+ }
+ } else if (initialValueSpecification instanceof LiteralReal && xtextValue instanceof LiteralRealRule) {
+ result = (LiteralReal) initialValueSpecification;
+ } else if (initialValueSpecification instanceof LiteralNull && xtextValue instanceof LiteralNullRule) {
+ result = (LiteralNull) initialValueSpecification;
+ } else if (initialValueSpecification instanceof LiteralString && xtextValue instanceof LiteralStringRule) {
+ result = (LiteralString) initialValueSpecification;
+ }
+ }
+ }
+ return result;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityLowerValueSetCommand.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityLowerValueSetCommand.java
new file mode 100644
index 00000000000..c0864e398c2
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityLowerValueSetCommand.java
@@ -0,0 +1,129 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * This class allow to define the multiplicity lower ValueSpecification set command which redefine the {@link #createValueSpecification(EObject, EObject, AbstractRule)} for the specific integer creation when the user fill an integer (instead of
+ * UnlimitedNatural).
+ */
+public class MultiplicityLowerValueSetCommand extends AbstractMultiplicityValueSpecificationSetCommand {
+
+ /**
+ * The instance of the class.
+ */
+ private static MultiplicityLowerValueSetCommand instance = new MultiplicityLowerValueSetCommand();
+
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityLowerValueSetCommand() {
+ super();
+ }
+
+ /**
+ * Get the single instance of MultiplicityLowerValueSetCommand.
+ *
+ * @return The single instance of MultiplicityLowerValueSetCommand.
+ */
+ public static MultiplicityLowerValueSetCommand getInstance() {
+ return instance;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand#createValueSpecification(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule)
+ */
+ @Override
+ protected ValueSpecification createValueSpecification(final EObject objectToEdit, final EObject initialValueSpecification, final AbstractRule abstractRule) {
+ ValueSpecification createdValueSpecification = null;
+
+ final EObject value = abstractRule.getValue();
+ if (null != abstractRule.getInstanceSpecification()) {
+ // Create an instance value with specification value
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createInstanceValue();
+ ((InstanceValue) createdValueSpecification)
+ .setInstance(abstractRule.getInstanceSpecification());
+ } else {
+ if (value instanceof LiteralBooleanRule) {
+ // Create a literal boolean
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralBoolean();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralBoolean) createdValueSpecification)
+ .setValue(Boolean
+ .parseBoolean(((LiteralBooleanRule) value)
+ .getValue()));
+ } else if (value instanceof LiteralIntegerOrUnlimitedNaturalRule) {
+ final LiteralIntegerOrUnlimitedNaturalRule integerValue = (LiteralIntegerOrUnlimitedNaturalRule) value;
+
+ // Always create an integer for the lower value of the multiplicity
+ if(null == integerValue.getUnlimited()){
+ int intValue = integerValue.getValue();
+
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralInteger();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralInteger) createdValueSpecification)
+ .setValue(intValue);
+ }
+ } else if (value instanceof LiteralRealRule) {
+ // Create a literal real
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralReal();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralReal) createdValueSpecification)
+ .setValue(((LiteralRealRule) value).getValue());
+ } else if (value instanceof LiteralNullRule) {
+ // Create a literal null
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralNull();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ } else if (value instanceof LiteralStringRule) {
+ // Create a literal real
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralString();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralString) createdValueSpecification)
+ .setValue(((LiteralStringRule) value).getValue());
+ }
+ }
+
+ return createdValueSpecification;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityUpperValueSetCommand.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityUpperValueSetCommand.java
new file mode 100644
index 00000000000..875ec0b0a7b
--- /dev/null
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/MultiplicityUpperValueSetCommand.java
@@ -0,0 +1,139 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralBooleanRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralIntegerOrUnlimitedNaturalRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralNullRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralRealRule;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.LiteralStringRule;
+import org.eclipse.uml2.uml.InstanceValue;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.LiteralReal;
+import org.eclipse.uml2.uml.LiteralString;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.ValueSpecification;
+
+/**
+ * This class allow to define the multiplicity lower ValueSpecification set command which redefine the {@link #createValueSpecification(EObject, EObject, AbstractRule)} for the specific LiteralUnlimitedNatural (or integer if lower than 0) creation when the
+ * user fill an integer.
+ */
+public class MultiplicityUpperValueSetCommand extends AbstractMultiplicityValueSpecificationSetCommand {
+
+ /**
+ * The instance of the class.
+ */
+ private static MultiplicityUpperValueSetCommand instance = new MultiplicityUpperValueSetCommand();
+
+
+ /**
+ * Constructor.
+ */
+ public MultiplicityUpperValueSetCommand() {
+ super();
+ }
+
+ /**
+ * Get the single instance of MultiplicityUpperValueSetCommand.
+ *
+ * @return The single instance of MultiplicityUpperValueSetCommand.
+ */
+ public static MultiplicityUpperValueSetCommand getInstance() {
+ return instance;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils.commands.ValueSpecificationSetCommand#createValueSpecification(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject,
+ * org.eclipse.papyrus.uml.textedit.valuespecification.xtext.umlValueSpecification.AbstractRule)
+ */
+ @Override
+ protected ValueSpecification createValueSpecification(final EObject objectToEdit, final EObject initialValueSpecification, final AbstractRule abstractRule) {
+ ValueSpecification createdValueSpecification = null;
+
+ final EObject value = abstractRule.getValue();
+ if (null != abstractRule.getInstanceSpecification()) {
+ // Create an instance value with specification value
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createInstanceValue();
+ ((InstanceValue) createdValueSpecification)
+ .setInstance(abstractRule.getInstanceSpecification());
+ } else {
+ if (value instanceof LiteralBooleanRule) {
+ // Create a literal boolean
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralBoolean();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralBoolean) createdValueSpecification)
+ .setValue(Boolean
+ .parseBoolean(((LiteralBooleanRule) value)
+ .getValue()));
+ } else if (value instanceof LiteralIntegerOrUnlimitedNaturalRule) {
+ final LiteralIntegerOrUnlimitedNaturalRule integerValue = (LiteralIntegerOrUnlimitedNaturalRule) value;
+
+ try{
+ int intValue = -1;
+
+ if (null == integerValue.getUnlimited()) {
+ intValue = integerValue.getValue();
+ }
+
+ // Always create a LiteralUnlimitedNatural for the upper value of the multiplicity
+ if(-1 <= intValue){
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralUnlimitedNatural();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralUnlimitedNatural) createdValueSpecification)
+ .setValue(intValue);
+ }
+ }catch(final NumberFormatException exception){
+ // Just continue
+ }
+
+ } else if (value instanceof LiteralRealRule) {
+ // Create a literal real
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralReal();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralReal) createdValueSpecification)
+ .setValue(((LiteralRealRule) value).getValue());
+ } else if (value instanceof LiteralNullRule) {
+ // Create a literal null
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralNull();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ } else if (value instanceof LiteralStringRule) {
+ // Create a literal real
+ createdValueSpecification = UMLFactory.eINSTANCE
+ .createLiteralString();
+ copyFeatureValues(createdValueSpecification,
+ initialValueSpecification);
+ ((LiteralString) createdValueSpecification)
+ .setValue(((LiteralStringRule) value).getValue());
+ }
+ }
+
+ return createdValueSpecification;
+ }
+
+}
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java
index c7be4974bf8..2444ffefd28 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.utils/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/utils/commands/ValueSpecificationSetCommand.java
@@ -857,13 +857,13 @@ public class ValueSpecificationSetCommand {
if (initialValueSpecification instanceof LiteralBoolean && xtextValue instanceof LiteralBooleanRule && isTypeNeeeded(objectToEdit, UMLPackage.Literals.LITERAL_BOOLEAN)) {
result = (LiteralBoolean) initialValueSpecification;
} else if (initialValueSpecification instanceof LiteralInteger && xtextValue instanceof LiteralIntegerOrUnlimitedNaturalRule && isTypeNeeeded(objectToEdit, UMLPackage.Literals.LITERAL_INTEGER)) {
- if (null != ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue).getUnlimited()) {
+ if (null == ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue).getUnlimited()) {
result = (LiteralInteger) initialValueSpecification;
}
} else if (initialValueSpecification instanceof LiteralUnlimitedNatural && xtextValue instanceof LiteralIntegerOrUnlimitedNaturalRule && isTypeNeeeded(objectToEdit, UMLPackage.Literals.LITERAL_UNLIMITED_NATURAL)) {
// Check that the value if positive for the unlimited natural type
-
- if (null != ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue).getUnlimited() || 0 <= ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue).getValue()) {
+ final LiteralIntegerOrUnlimitedNaturalRule integerValue = ((LiteralIntegerOrUnlimitedNaturalRule) xtextValue);
+ if (null != integerValue.getUnlimited() || 0 <= integerValue.getValue()) {
result = (LiteralUnlimitedNatural) initialValueSpecification;
}
} else if (initialValueSpecification instanceof LiteralReal && xtextValue instanceof LiteralRealRule && isTypeNeeeded(objectToEdit, UMLPackage.Literals.LITERAL_REAL)) {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ExtendedMultiplicityObservableValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ExtendedMultiplicityObservableValue.java
new file mode 100644
index 00000000000..157d79c039a
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ExtendedMultiplicityObservableValue.java
@@ -0,0 +1,85 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.tools.databinding;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.databinding.observable.value.AbstractObservableValue;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.uml.tools.helper.UMLDatabindingHelper;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * The multiplicity observable values contains a list of 3 observable values : The first the multiplicity lower and upper value for the 'simple' mode and the 2 following are the lower and the upper value observable value.
+ */
+public class ExtendedMultiplicityObservableValue extends AbstractObservableValue {
+
+ /**
+ * The number of ObservableValue in the ObservableList.
+ */
+ private static final int NUMBER_OBSERVABLE_VALUES = 3;
+
+
+ /**
+ * The list of observable values for the multiplicity editors (simple mode, lower and upper values)
+ */
+ private final List<IObservableValue> observableValues;
+
+
+ /**
+ * Constructor.
+ *
+ * @param eObject
+ * The object to edit.
+ * @param domain
+ * The editing domain.
+ */
+ public ExtendedMultiplicityObservableValue(final EObject eObject, final EditingDomain domain) {
+ observableValues = new ArrayList<IObservableValue>(NUMBER_OBSERVABLE_VALUES);
+ observableValues.add(new MultiplicityObservableValue(eObject, domain));
+
+ // Get the lower and upper values features
+ final EStructuralFeature lowerValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue();
+ final EStructuralFeature upperValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue();
+
+ // Add the ObservableValues
+ observableValues.add(UMLDatabindingHelper.getObservableValue(eObject, lowerValueFeature, domain));
+ observableValues.add(UMLDatabindingHelper.getObservableValue(eObject, upperValueFeature, domain));
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.value.IObservableValue#getValueType()
+ */
+ @Override
+ public Object getValueType() {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.eclipse.core.databinding.observable.value.AbstractObservableValue#doGetValue()
+ */
+ @Override
+ protected Object doGetValue() {
+ return observableValues;
+ }
+
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/MultiplicityObservableValue.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/MultiplicityObservableValue.java
index 565395e8871..0f704c8a88f 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/MultiplicityObservableValue.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/MultiplicityObservableValue.java
@@ -1,223 +1,230 @@
-/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
- *
- * 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:
- * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - 402525
- * Christian W. Damus (CEA) - bug 417409
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.tools.databinding;
-
-import org.eclipse.core.databinding.observable.ChangeEvent;
-import org.eclipse.core.databinding.observable.IChangeListener;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.IObserving;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.ValueDiff;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.UnexecutableCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable;
-import org.eclipse.papyrus.infra.tools.databinding.ReferenceCountedObservable;
-import org.eclipse.papyrus.uml.tools.Activator;
-import org.eclipse.papyrus.uml.tools.commands.SetMultiplicityCommand;
-import org.eclipse.papyrus.uml.tools.helper.UMLDatabindingHelper;
-import org.eclipse.papyrus.uml.tools.util.MultiplicityParser;
-import org.eclipse.uml2.uml.MultiplicityElement;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- * An ObservableValue for manipulating the UML Multiplicity property.
- * Multiplicity is a simple, virtual property, aggregating both lowerBound and upperBound,
- * and presenting them as an Enumeration with 4 values : 1, 0-1, 0-*, 1-*
- *
- * The values are edited with commands executed on the given editing domain.
- * These commands will probably only work in a Papyrus context.
- *
- * @author Camille Letavernier
- */
-public class MultiplicityObservableValue extends ReferenceCountedObservable.Value implements IChangeListener, CommandBasedObservableValue, AggregatedObservable, IObserving {
-
- private IObservableValue lowerBound, upperBound, lowerValue, upperValue, lowerValueSpecification, upperValueSpecification;
-
- private EStructuralFeature lowerFeature, upperFeature;
-
- private EObject eObject;
-
- private EditingDomain domain;
-
- /**
- * Constructor.
- *
- * @param eObject
- * The EObject which the multiplicity is being edited
- * @param domain
- * The Editing Domain on which the commands will be executed
- */
- public MultiplicityObservableValue(EObject eObject, EditingDomain domain) {
- this.eObject = eObject;
- this.domain = domain;
-
- lowerFeature = UMLPackage.eINSTANCE.getMultiplicityElement_Lower();
- upperFeature = UMLPackage.eINSTANCE.getMultiplicityElement_Upper();
-
- EStructuralFeature lowerValueFeature, upperValueFeature, lowerValueSpecificationFeature, upperValueSpecificationFeature;
-
- lowerValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue();
- upperValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue();
- lowerValueSpecificationFeature = UMLPackage.eINSTANCE.getLiteralInteger_Value();
- upperValueSpecificationFeature = UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value();
-
- lowerBound = UMLDatabindingHelper.getObservableValue(eObject, lowerFeature, domain);
- upperBound = UMLDatabindingHelper.getObservableValue(eObject, upperFeature, domain);
-
- lowerValue = UMLDatabindingHelper.getObservableValue(eObject, lowerValueFeature, domain);
- upperValue = UMLDatabindingHelper.getObservableValue(eObject, upperValueFeature, domain);
-
- lowerValueSpecification = getValueSpecification(lowerValue, lowerValueSpecificationFeature, domain);
- upperValueSpecification = getValueSpecification(upperValue, upperValueSpecificationFeature, domain);
-
- lowerValue.addChangeListener(this);
- upperValue.addChangeListener(this);
-
- if (lowerValueSpecification != null) {
- lowerValueSpecification.addChangeListener(this);
- }
- if (upperValueSpecification != null) {
- upperValueSpecification.addChangeListener(this);
- }
- }
-
- private IObservableValue getValueSpecification(IObservableValue source, EStructuralFeature specificationFeature, EditingDomain domain) {
- if (source.getValue() == null) {
- return null;
- }
- return UMLDatabindingHelper.getObservableValue((EObject) source.getValue(), specificationFeature, domain);
-
- }
-
- /**
- * @see org.eclipse.core.databinding.observable.IChangeListener#handleChange(org.eclipse.core.databinding.observable.ChangeEvent)
- *
- * @param event
- */
- public void handleChange(ChangeEvent event) {
- boolean fireChange = false;
- if (event.getSource() == lowerValue || event.getSource() == upperValue) {
- fireChange = true;
- lowerValueSpecification = getValueSpecification(lowerValue, UMLPackage.eINSTANCE.getLiteralInteger_Value(), domain);
- upperValueSpecification = getValueSpecification(upperValue, UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value(), domain);
- }
-
- if (event.getSource() == lowerValueSpecification || event.getSource() == upperValueSpecification) {
- fireChange = true;
- }
-
- if (fireChange) {
- final Object value = getValue();
- fireValueChange(new ValueDiff() {
-
- @Override
- public Object getOldValue() {
- return null; // Unknown
- }
-
- @Override
- public Object getNewValue() {
- return value;
- }
-
- });
- }
- }
-
- public Object getObserved() {
- return eObject;
- }
-
- @Override
- public synchronized void dispose() {
- lowerValue.removeChangeListener(this);
- upperValue.removeChangeListener(this);
- if (lowerValueSpecification != null) {
- lowerValueSpecification.removeChangeListener(this);
- lowerValueSpecification.dispose();
- }
- if (upperValueSpecification != null) {
- upperValueSpecification.removeChangeListener(this);
- upperValueSpecification.dispose();
- }
-
- lowerValue.dispose();
- upperValue.dispose();
-
- lowerBound.dispose();
- upperBound.dispose();
-
- super.dispose();
- }
-
- public Object getValueType() {
- return String.class;
- }
-
- @Override
- protected String doGetValue() {
- int upper, lower;
- upper = lower = 0;
-
- Object lowerValue = lowerBound.getValue();
- Object upperValue = upperBound.getValue();
- lower = (Integer) lowerValue;
- upper = (Integer) upperValue;
-
- return MultiplicityParser.getMultiplicity(lower, upper);
- }
-
- @Override
- protected void doSetValue(Object value) {
- Command command = getCommand(value);
- domain.getCommandStack().execute(command);
- }
-
- public Command getCommand(Object value) {
- String val = (String) value;
-
- int[] lowerUpper = MultiplicityParser.getBounds(val);
- if (lowerUpper == null || lowerUpper.length < 2) {
- return UnexecutableCommand.INSTANCE; // Invalid multiplicity
- }
-
- int lower = lowerUpper[0], upper = lowerUpper[1];
- if (MultiplicityParser.isValidMultiplicity(lower, upper)) {
- try {
- return new SetMultiplicityCommand((MultiplicityElement) eObject, val);
- } catch (Exception ex) {
- Activator.log.error(ex);
- }
- }
-
- return UnexecutableCommand.INSTANCE;
- }
-
- public AggregatedObservable aggregate(IObservable observable) {
- try {
- return new AggregatedPapyrusObservableValue(domain, this, observable);
- } catch (IllegalArgumentException ex) {
- return null; // The observable cannot be aggregated
- }
- }
-
- public boolean hasDifferentValues() {
- return false;
- }
-
-}
+/*****************************************************************************
+ * Copyright (c) 2010, 2014 CEA LIST and others.
+ *
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - 402525
+ * Christian W. Damus (CEA) - bug 417409
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.tools.databinding;
+
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.ValueDiff;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.tools.databinding.AggregatedObservable;
+import org.eclipse.papyrus.infra.tools.databinding.ReferenceCountedObservable;
+import org.eclipse.papyrus.uml.tools.Activator;
+import org.eclipse.papyrus.uml.tools.commands.SetMultiplicityCommand;
+import org.eclipse.papyrus.uml.tools.helper.UMLDatabindingHelper;
+import org.eclipse.papyrus.uml.tools.util.MultiplicityParser;
+import org.eclipse.papyrus.uml.tools.utils.MultiplicityElementUtil;
+import org.eclipse.uml2.uml.MultiplicityElement;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * An ObservableValue for manipulating the UML Multiplicity property.
+ * Multiplicity is a simple, virtual property, aggregating both lowerBound and upperBound,
+ * and presenting them as an Enumeration with 4 values : 1, 0-1, 0-*, 1-*
+ *
+ * The values are edited with commands executed on the given editing domain.
+ * These commands will probably only work in a Papyrus context.
+ *
+ * @author Camille Letavernier
+ */
+public class MultiplicityObservableValue extends ReferenceCountedObservable.Value implements IChangeListener, CommandBasedObservableValue, AggregatedObservable, IObserving {
+
+ private IObservableValue lowerBound, upperBound, lowerValue, upperValue, lowerValueSpecification, upperValueSpecification;
+
+ private EStructuralFeature lowerFeature, upperFeature;
+
+ private EObject eObject;
+
+ private EditingDomain domain;
+
+ /**
+ * Constructor.
+ *
+ * @param eObject
+ * The EObject which the multiplicity is being edited
+ * @param domain
+ * The Editing Domain on which the commands will be executed
+ */
+ public MultiplicityObservableValue(EObject eObject, EditingDomain domain) {
+ this.eObject = eObject;
+ this.domain = domain;
+
+ lowerFeature = UMLPackage.eINSTANCE.getMultiplicityElement_Lower();
+ upperFeature = UMLPackage.eINSTANCE.getMultiplicityElement_Upper();
+
+ EStructuralFeature lowerValueFeature, upperValueFeature, lowerValueSpecificationFeature, upperValueSpecificationFeature;
+
+ lowerValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue();
+ upperValueFeature = UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue();
+ lowerValueSpecificationFeature = UMLPackage.eINSTANCE.getLiteralInteger_Value();
+ upperValueSpecificationFeature = UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value();
+
+ lowerBound = UMLDatabindingHelper.getObservableValue(eObject, lowerFeature, domain);
+ upperBound = UMLDatabindingHelper.getObservableValue(eObject, upperFeature, domain);
+
+ lowerValue = UMLDatabindingHelper.getObservableValue(eObject, lowerValueFeature, domain);
+ upperValue = UMLDatabindingHelper.getObservableValue(eObject, upperValueFeature, domain);
+
+ lowerValueSpecification = getValueSpecification(lowerValue, lowerValueSpecificationFeature, domain);
+ upperValueSpecification = getValueSpecification(upperValue, upperValueSpecificationFeature, domain);
+
+ lowerValue.addChangeListener(this);
+ upperValue.addChangeListener(this);
+
+ if (lowerValueSpecification != null) {
+ lowerValueSpecification.addChangeListener(this);
+ }
+ if (upperValueSpecification != null) {
+ upperValueSpecification.addChangeListener(this);
+ }
+ }
+
+ private IObservableValue getValueSpecification(IObservableValue source, EStructuralFeature specificationFeature, EditingDomain domain) {
+ if (source.getValue() == null) {
+ return null;
+ }
+ return UMLDatabindingHelper.getObservableValue((EObject) source.getValue(), specificationFeature, domain);
+
+ }
+
+ /**
+ * @see org.eclipse.core.databinding.observable.IChangeListener#handleChange(org.eclipse.core.databinding.observable.ChangeEvent)
+ *
+ * @param event
+ */
+ public void handleChange(ChangeEvent event) {
+ boolean fireChange = false;
+ if (event.getSource() == lowerValue || event.getSource() == upperValue) {
+ fireChange = true;
+ lowerValueSpecification = getValueSpecification(lowerValue, UMLPackage.eINSTANCE.getLiteralInteger_Value(), domain);
+ upperValueSpecification = getValueSpecification(upperValue, UMLPackage.eINSTANCE.getLiteralUnlimitedNatural_Value(), domain);
+ }
+
+ if (event.getSource() == lowerValueSpecification || event.getSource() == upperValueSpecification) {
+ fireChange = true;
+ }
+
+ if (fireChange) {
+ final Object value = getValue();
+ fireValueChange(new ValueDiff() {
+
+ @Override
+ public Object getOldValue() {
+ return null; // Unknown
+ }
+
+ @Override
+ public Object getNewValue() {
+ return value;
+ }
+
+ });
+ }
+ }
+
+ public Object getObserved() {
+ return eObject;
+ }
+
+ @Override
+ public synchronized void dispose() {
+ lowerValue.removeChangeListener(this);
+ upperValue.removeChangeListener(this);
+ if (lowerValueSpecification != null) {
+ lowerValueSpecification.removeChangeListener(this);
+ lowerValueSpecification.dispose();
+ }
+ if (upperValueSpecification != null) {
+ upperValueSpecification.removeChangeListener(this);
+ upperValueSpecification.dispose();
+ }
+
+ lowerValue.dispose();
+ upperValue.dispose();
+
+ lowerBound.dispose();
+ upperBound.dispose();
+
+ super.dispose();
+ }
+
+ public Object getValueType() {
+ return String.class;
+ }
+
+ @Override
+ protected String doGetValue() {
+ String result = null;
+ if (eObject instanceof MultiplicityElement) {
+ result = MultiplicityElementUtil.formatMultiplicityNoBrackets((MultiplicityElement) eObject);
+ } else {
+ int upper, lower;
+ upper = lower = 0;
+
+ Object lowerValue = lowerBound.getValue();
+ Object upperValue = upperBound.getValue();
+ lower = (Integer) lowerValue;
+ upper = (Integer) upperValue;
+
+ result = MultiplicityParser.getMultiplicity(lower, upper);
+ }
+ return result;
+ }
+
+ @Override
+ protected void doSetValue(Object value) {
+ Command command = getCommand(value);
+ domain.getCommandStack().execute(command);
+ }
+
+ public Command getCommand(Object value) {
+ String val = (String) value;
+
+ int[] lowerUpper = MultiplicityParser.getBounds(val);
+ if (lowerUpper == null || lowerUpper.length < 2) {
+ return UnexecutableCommand.INSTANCE; // Invalid multiplicity
+ }
+
+ int lower = lowerUpper[0], upper = lowerUpper[1];
+ if (MultiplicityParser.isValidMultiplicity(lower, upper)) {
+ try {
+ return new SetMultiplicityCommand((MultiplicityElement) eObject, val);
+ } catch (Exception ex) {
+ Activator.log.error(ex);
+ }
+ }
+
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ public AggregatedObservable aggregate(IObservable observable) {
+ try {
+ return new AggregatedPapyrusObservableValue(domain, this, observable);
+ } catch (IllegalArgumentException ex) {
+ return null; // The observable cannot be aggregated
+ }
+ }
+
+ public boolean hasDifferentValues() {
+ return false;
+ }
+
+}
diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java
index 9aa46f82493..08b23258490 100644
--- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java
+++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14CompositeStructureDiagramElementTypesTest.java
@@ -35,346 +35,309 @@ public class SysML14CompositeStructureDiagramElementTypesTest {
Assert.assertNotNull("The SysML 1.4 Composite Structure Diagram element type set definition is missing", elementTypeSetConfiguration);
}
-
- @Test
- public void testRegistryContentForValueType_3080() {
- Assert.assertTrue("ValueType (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_3080"));
- }
-
- @Test
- public void testRegistryContentForValueType_2068() {
- Assert.assertTrue("ValueType (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_2068"));
- }
-
- @Test
- public void testRegistryContentForDistributedProperty_3070() {
- Assert.assertTrue("DistributedProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForDistributedProperty_3101() {
- Assert.assertTrue("DistributedProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForConnectorProperty_3070() {
- Assert.assertTrue("ConnectorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForConnectorProperty_3101() {
- Assert.assertTrue("ConnectorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForParticipantProperty_3070() {
- Assert.assertTrue("ParticipantProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForParticipantProperty_3101() {
- Assert.assertTrue("ParticipantProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForBindingConnector() {
- Assert.assertTrue("BindingConnector element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BindingConnector_4013"));
- }
-
- @Test
- public void testRegistryContentForBlock_3085() {
- Assert.assertTrue("Block (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_3085"));
- }
-
- @Test
- public void testRegistryContentForBlock_2073() {
- Assert.assertTrue("Block (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_2073"));
- }
-
- @Test
- public void testRegistryContentForEndPathMultiplicity_3070() {
- Assert.assertTrue("EndPathMultiplicity (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"));
- }
-
- @Test
- public void testRegistryContentForEndPathMultiplicity_3101() {
- Assert.assertTrue("EndPathMultiplicity (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"));
- }
-
- @Test
- public void testRegistryContentForBoundReference_3070() {
- Assert.assertTrue("BoundReference (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3070"));
- }
-
- @Test
- public void testRegistryContentForBoundReference_3101() {
- Assert.assertTrue("BoundReference (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3101"));
- }
-
- @Test
- public void testRegistryContentForAdjunctProperty_3070() {
- Assert.assertTrue("AdjunctProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForAdjunctProperty_3101() {
- Assert.assertTrue("AdjunctProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForClassifierBehaviorProperty_3070() {
- Assert.assertTrue("ClassifierBehaviorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForClassifierBehaviorProperty_3101() {
- Assert.assertTrue("ClassifierBehaviorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForItemFlow() {
- Assert.assertTrue("ItemFlow element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ItemFlow_4021"));
- }
-
- @Test
- public void testRegistryContentForFlowProperty_3070() {
- Assert.assertTrue("FlowProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3070"));
- }
-
- @Test
- public void testRegistryContentForFlowProperty_3101() {
- Assert.assertTrue("FlowProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3101"));
- }
-
- @Test
- public void testRegistryContentForFullPort() {
- Assert.assertTrue("FullPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FullPort_3069"));
- }
-
- @Test
- public void testRegistryContentForInterfaceBlock_3085() {
- Assert.assertTrue("InterfaceBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_3085"));
- }
-
- @Test
- public void testRegistryContentForInterfaceBlock_2073() {
- Assert.assertTrue("InterfaceBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_2073"));
- }
-
- @Test
- public void testRegistryContentForProxyPort() {
- Assert.assertTrue("ProxyPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ProxyPort_3069"));
- }
-
- @Test
- public void testRegistryContentForChangeStructuralFeatureEvent() {
- Assert.assertTrue("ChangeStructuralFeatureEvent element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"));
- }
-
- @Test
- public void testRegistryContentForControlOperator_Operation() {
- Assert.assertTrue("ControlOperator Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"));
- }
-
- @Test
- public void testRegistryContentForRate_Parameter() {
- Assert.assertTrue("Rate Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rate_Parameter_3088"));
- }
-
- @Test
- public void testRegistryContentForDiscrete_Parameter() {
- Assert.assertTrue("Discrete Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"));
- }
-
- @Test
- public void testRegistryContentForContinuous_Parameter() {
- Assert.assertTrue("Continuous Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"));
- }
-
- @Test
- public void testRegistryContentForOptional() {
- Assert.assertTrue("Optional element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Optional_3088"));
- }
-
- @Test
- public void testRegistryContentForRationale_3097() {
- Assert.assertTrue("Rationale (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_3097"));
- }
-
- @Test
- public void testRegistryContentForRationale_2109() {
- Assert.assertTrue("Rationale (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_2109"));
- }
-
- @Test
- public void testRegistryContentForView_Package() {
- Assert.assertTrue("View Package element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"));
- }
-
- @Test
- public void testRegistryContentForView_3085() {
- Assert.assertTrue("View (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_3085"));
- }
-
- @Test
- public void testRegistryContentForView_2073() {
- Assert.assertTrue("View (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_2073"));
- }
-
- @Test
- public void testRegistryContentForConform_Dependency() {
- Assert.assertTrue("Conform Dependency element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Dependency_4010"));
- }
-
- @Test
- public void testRegistryContentForConform_Generalization() {
- Assert.assertTrue("Conform Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Generalization_4015"));
- }
-
- @Test
- public void testRegistryContentForProblem_3097() {
- Assert.assertTrue("Problem (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_3097"));
- }
-
- @Test
- public void testRegistryContentForProblem_2109() {
- Assert.assertTrue("Problem (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_2109"));
- }
-
- @Test
- public void testRegistryContentForViewPoint_3085() {
- Assert.assertTrue("ViewPoint (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_3085"));
- }
-
- @Test
- public void testRegistryContentForViewPoint_2073() {
- Assert.assertTrue("ViewPoint (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_2073"));
- }
-
- @Test
- public void testRegistryContentForExpose() {
- Assert.assertTrue("Expose element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Expose_4010"));
- }
-
- @Test
- public void testRegistryContentForElementGroup_3097() {
- Assert.assertTrue("ElementGroup (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_3097"));
- }
-
- @Test
- public void testRegistryContentForElementGroup_2109() {
- Assert.assertTrue("ElementGroup (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_2109"));
- }
-
- @Test
- public void testRegistryContentForConstraintBlock_3085() {
- Assert.assertTrue("ConstraintBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_3085"));
- }
-
- @Test
- public void testRegistryContentForConstraintBlock_2073() {
- Assert.assertTrue("ConstraintBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_2073"));
- }
-
- @Test
- public void testRegistryContentForAllocate_Abstraction() {
- Assert.assertTrue("Allocate Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForDeriveReqt_Abstraction() {
- Assert.assertTrue("DeriveReqt Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForCopy_Abstraction() {
- Assert.assertTrue("Copy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForSatisfy_Abstraction() {
- Assert.assertTrue("Satisfy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForTestCase_Operation() {
- Assert.assertTrue("TestCase Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.TestCase_Operation_3102"));
- }
-
- @Test
- public void testRegistryContentForRequirement_3085() {
- Assert.assertTrue("Requirement (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_3085"));
- }
-
- @Test
- public void testRegistryContentForRequirement_2073() {
- Assert.assertTrue("Requirement (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_2073"));
- }
-
- @Test
- public void testRegistryContentForVerify_Abstraction() {
- Assert.assertTrue("Verify Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForTrace_Abstraction() {
- Assert.assertTrue("Trace Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForRefine_Abstraction() {
- Assert.assertTrue("Refine Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"));
- }
-
- @Test
- public void testRegistryContentForFlowPort() {
- Assert.assertTrue("FlowPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowPort_3069"));
- }
-
- @Test
- public void testRegistryContentForFlowSpecification_3087() {
- Assert.assertTrue("FlowSpecification (3087) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_3087"));
- }
-
- @Test
- public void testRegistryContentForFlowSpecification_2076() {
- Assert.assertTrue("FlowSpecification (2076) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_2076"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3070() {
- Assert.assertTrue("Deprecated (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property_3070"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3101() {
- Assert.assertTrue("Deprecated (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property_3101"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3085() {
- Assert.assertTrue("Deprecated (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class_3085"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_2073() {
- Assert.assertTrue("Deprecated (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class_2073"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_Generalization() {
- Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Generalization_4015"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3080() {
- Assert.assertTrue("Deprecated (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType_3080"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_2068() {
- Assert.assertTrue("Deprecated (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType_2068"));
- }
-
+ @Test
+ public void testRegistryContentForValueType_3080() {
+ Assert.assertTrue("ValueType (3080) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_3080"));
+ }
+
+ @Test
+ public void testRegistryContentForValueType_2068() {
+ Assert.assertTrue("ValueType (2068) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType_2068"));
+ }
+
+ @Test
+ public void testRegistryContentForDistributedProperty_3070() {
+ Assert.assertTrue("DistributedProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForDistributedProperty_3101() {
+ Assert.assertTrue("DistributedProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DistributedProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForConnectorProperty_3070() {
+ Assert.assertTrue("ConnectorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForConnectorProperty_3101() {
+ Assert.assertTrue("ConnectorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConnectorProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForParticipantProperty_3070() {
+ Assert.assertTrue("ParticipantProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForParticipantProperty_3101() {
+ Assert.assertTrue("ParticipantProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ParticipantProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForBindingConnector() {
+ Assert.assertTrue("BindingConnector element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BindingConnector_4013"));
+ }
+
+ @Test
+ public void testRegistryContentForBlock_3085() {
+ Assert.assertTrue("Block (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForBlock_2073() {
+ Assert.assertTrue("Block (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Block_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForEndPathMultiplicity_3070() {
+ Assert.assertTrue("EndPathMultiplicity (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForEndPathMultiplicity_3101() {
+ Assert.assertTrue("EndPathMultiplicity (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.EndPathMultiplicity_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForBoundReference_3070() {
+ Assert.assertTrue("BoundReference (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForBoundReference_3101() {
+ Assert.assertTrue("BoundReference (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.BoundReference_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForAdjunctProperty_3070() {
+ Assert.assertTrue("AdjunctProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForAdjunctProperty_3101() {
+ Assert.assertTrue("AdjunctProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.AdjunctProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForClassifierBehaviorProperty_3070() {
+ Assert.assertTrue("ClassifierBehaviorProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForClassifierBehaviorProperty_3101() {
+ Assert.assertTrue("ClassifierBehaviorProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ClassifierBehaviorProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForItemFlow() {
+ Assert.assertTrue("ItemFlow element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ItemFlow_4021"));
+ }
+
+ @Test
+ public void testRegistryContentForFlowProperty_3070() {
+ Assert.assertTrue("FlowProperty (3070) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3070"));
+ }
+
+ @Test
+ public void testRegistryContentForFlowProperty_3101() {
+ Assert.assertTrue("FlowProperty (3101) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowProperty_3101"));
+ }
+
+ @Test
+ public void testRegistryContentForFullPort() {
+ Assert.assertTrue("FullPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FullPort_3069"));
+ }
+
+ @Test
+ public void testRegistryContentForInterfaceBlock_3085() {
+ Assert.assertTrue("InterfaceBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForInterfaceBlock_2073() {
+ Assert.assertTrue("InterfaceBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.InterfaceBlock_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForProxyPort() {
+ Assert.assertTrue("ProxyPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ProxyPort_3069"));
+ }
+
+ @Test
+ public void testRegistryContentForChangeStructuralFeatureEvent() {
+ Assert.assertTrue("ChangeStructuralFeatureEvent element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ChangeStructuralFeatureEvent_2088"));
+ }
+
+ @Test
+ public void testRegistryContentForControlOperator_Operation() {
+ Assert.assertTrue("ControlOperator Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ControlOperator_Operation_3102"));
+ }
+
+ @Test
+ public void testRegistryContentForRate_Parameter() {
+ Assert.assertTrue("Rate Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rate_Parameter_3088"));
+ }
+
+ @Test
+ public void testRegistryContentForDiscrete_Parameter() {
+ Assert.assertTrue("Discrete Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Discrete_Parameter_3088"));
+ }
+
+ @Test
+ public void testRegistryContentForContinuous_Parameter() {
+ Assert.assertTrue("Continuous Parameter element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Continuous_Parameter_3088"));
+ }
+
+ @Test
+ public void testRegistryContentForOptional() {
+ Assert.assertTrue("Optional element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Optional_3088"));
+ }
+
+ @Test
+ public void testRegistryContentForRationale_3097() {
+ Assert.assertTrue("Rationale (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_3097"));
+ }
+
+ @Test
+ public void testRegistryContentForRationale_2109() {
+ Assert.assertTrue("Rationale (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Rationale_2109"));
+ }
+
+ @Test
+ public void testRegistryContentForView_Package() {
+ Assert.assertTrue("View Package element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Package_CompositeStructure"));
+ }
+
+ @Test
+ public void testRegistryContentForView_3085() {
+ Assert.assertTrue("View (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForView_2073() {
+ Assert.assertTrue("View (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.View_Class_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForConform_Dependency() {
+ Assert.assertTrue("Conform Dependency element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Dependency_4010"));
+ }
+
+ @Test
+ public void testRegistryContentForConform_Generalization() {
+ Assert.assertTrue("Conform Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Conform_Generalization_4015"));
+ }
+
+ @Test
+ public void testRegistryContentForProblem_3097() {
+ Assert.assertTrue("Problem (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_3097"));
+ }
+
+ @Test
+ public void testRegistryContentForProblem_2109() {
+ Assert.assertTrue("Problem (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Problem_2109"));
+ }
+
+ @Test
+ public void testRegistryContentForViewPoint_3085() {
+ Assert.assertTrue("ViewPoint (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForViewPoint_2073() {
+ Assert.assertTrue("ViewPoint (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ViewPoint_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForExpose() {
+ Assert.assertTrue("Expose element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Expose_4010"));
+ }
+
+ @Test
+ public void testRegistryContentForElementGroup_3097() {
+ Assert.assertTrue("ElementGroup (3097) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_3097"));
+ }
+
+ @Test
+ public void testRegistryContentForElementGroup_2109() {
+ Assert.assertTrue("ElementGroup (2109) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ElementGroup_2109"));
+ }
+
+ @Test
+ public void testRegistryContentForConstraintBlock_3085() {
+ Assert.assertTrue("ConstraintBlock (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForConstraintBlock_2073() {
+ Assert.assertTrue("ConstraintBlock (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ConstraintBlock_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForAllocate_Abstraction() {
+ Assert.assertTrue("Allocate Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Allocate_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForDeriveReqt_Abstraction() {
+ Assert.assertTrue("DeriveReqt Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.DeriveReqt_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForCopy_Abstraction() {
+ Assert.assertTrue("Copy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Copy_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForSatisfy_Abstraction() {
+ Assert.assertTrue("Satisfy Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Satisfy_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForTestCase_Operation() {
+ Assert.assertTrue("TestCase Operation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.TestCase_Operation_3102"));
+ }
+
+ @Test
+ public void testRegistryContentForRequirement_3085() {
+ Assert.assertTrue("Requirement (3085) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_3085"));
+ }
+
+ @Test
+ public void testRegistryContentForRequirement_2073() {
+ Assert.assertTrue("Requirement (2073) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Requirement_2073"));
+ }
+
+ @Test
+ public void testRegistryContentForVerify_Abstraction() {
+ Assert.assertTrue("Verify Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForTrace_Abstraction() {
+ Assert.assertTrue("Trace Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Trace_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForRefine_Abstraction() {
+ Assert.assertTrue("Refine Abstraction element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Refine_Abstraction_4007"));
+ }
+
+ @Test
+ public void testRegistryContentForFlowPort() {
+ Assert.assertTrue("FlowPort element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowPort_3069"));
+ }
+
+ @Test
+ public void testRegistryContentForFlowSpecification_3087() {
+ Assert.assertTrue("FlowSpecification (3087) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_3087"));
+ }
+
+ @Test
+ public void testRegistryContentForFlowSpecification_2076() {
+ Assert.assertTrue("FlowSpecification (2076) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.FlowSpecification_2076"));
+ }
}
diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java
index 6fadf2fbb44..6db4105cd36 100644
--- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java
+++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.diagram.common.tests/src/org/eclipse/papyrus/sysml14/diagram/common/tests/SysML14UMLClassDiagramElementTypesTest.java
@@ -155,6 +155,11 @@ public class SysML14UMLClassDiagramElementTypesTest {
}
@Test
+ public void testRegistryContentForBlock_NestedBlock_Classifier() {
+ Assert.assertTrue("Block (NestedBlock_Classifier) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Block_NestedBlock_Classifier"));
+ }
+
+ @Test
public void testRegistryContentForBlock_3004() {
Assert.assertTrue("Block (3004) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Block_3004"));
}
@@ -655,119 +660,88 @@ public class SysML14UMLClassDiagramElementTypesTest {
}
@Test
- public void testRegistryContentForDeprecated_3002() {
- Assert.assertTrue("Deprecated (3002) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3002"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3005() {
- Assert.assertTrue("Deprecated (3005) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3005"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3006() {
- Assert.assertTrue("Deprecated (3006) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3006"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3012() {
- Assert.assertTrue("Deprecated (3012) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3012"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3018() {
- Assert.assertTrue("Deprecated (3018) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3018"));
+ public void testRegistryContentForFlowPort_FlowPort_Label() {
+ Assert.assertTrue("FlowPort (FlowPort_Label) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_Label"));
}
@Test
- public void testRegistryContentForDeprecated_3041() {
- Assert.assertTrue("Deprecated (3041) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Property_3041"));
+ public void testRegistryContentForFlowPort_3005() {
+ Assert.assertTrue("FlowPort (3005) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3005"));
}
@Test
- public void testRegistryContentForDeprecated_4021() {
- Assert.assertTrue("Deprecated (4021) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_4021"));
+ public void testRegistryContentForFlowPort_3006() {
+ Assert.assertTrue("FlowPort (3006) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3006"));
}
@Test
- public void testRegistryContentForDeprecated_2001() {
- Assert.assertTrue("Deprecated (2001) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_2001"));
+ public void testRegistryContentForFlowPort_3012() {
+ Assert.assertTrue("FlowPort (3012) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3012"));
}
@Test
- public void testRegistryContentForDeprecated_3020() {
- Assert.assertTrue("Deprecated (3020) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_InstanceSpecification_3020"));
+ public void testRegistryContentForFlowPort_3018() {
+ Assert.assertTrue("FlowPort (3018) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3018"));
}
@Test
- public void testRegistryContentForDeprecated_2008() {
- Assert.assertTrue("Deprecated (2008) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_2008"));
+ public void testRegistryContentForFlowPort_3041() {
+ Assert.assertTrue("FlowPort (3041) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.FlowPort_3041"));
}
@Test
- public void testRegistryContentForDeprecated_3004() {
- Assert.assertTrue("Deprecated (3004) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3004"));
+ public void testRegistryContentForControlOperator_Operation_BorderItem() {
+ Assert.assertTrue("ControlOperator (Operation_BorderItem) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.ControlOperator_Operation_Operation_BorderItem"));
}
@Test
- public void testRegistryContentForDeprecated_3008() {
- Assert.assertTrue("Deprecated (3008) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3008"));
+ public void testRegistryContentForVerify_Link() {
+ Assert.assertTrue("Verify_Link element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Verify_Abstraction_Verify_Link"));
}
@Test
- public void testRegistryContentForDeprecated_3010() {
- Assert.assertTrue("Deprecated (3010) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3010"));
+ public void testRegistryContentForConstraint_Constraint_Label() {
+ Assert.assertTrue("Constraint (Constraint_Label) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Constraint_Label"));
}
@Test
- public void testRegistryContentForDeprecated_3014() {
- Assert.assertTrue("Deprecated (3014) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Class_3014"));
+ public void testRegistryContentForActor() {
+ Assert.assertTrue("Actor element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Actor_2008"));
}
@Test
- public void testRegistryContentForDeprecated_2015() {
- Assert.assertTrue("Deprecated (2015) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_2015"));
+ public void testRegistryContentForUnit_2001() {
+ Assert.assertTrue("Unit_2001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Unit_2001"));
}
@Test
- public void testRegistryContentForDeprecated_4001() {
- Assert.assertTrue("Deprecated (4001) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_4001"));
+ public void testRegistryContentForUnit_3020() {
+ Assert.assertTrue("Unit_3020 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Unit_3020"));
}
@Test
- public void testRegistryContentForDeprecated_4019() {
- Assert.assertTrue("Deprecated (4019) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Association_4019"));
+ public void testRegistryContentForQuantityKind_2001() {
+ Assert.assertTrue("QuantityKind_2001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.QuantityKind_2001"));
}
@Test
- public void testRegistryContentForDeprecated_Generalization() {
- Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_Generalization_4002"));
+ public void testRegistryContentForQuantityKind_3020() {
+ Assert.assertTrue("QuantityKind_3020 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.QuantityKind_3020"));
}
@Test
- public void testRegistryContentForDeprecated_2010() {
- Assert.assertTrue("Deprecated (2010) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_2010"));
+ public void testRegistryContentForPartAssociation_2015() {
+ Assert.assertTrue("PartAssociation_2015 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_2015"));
}
@Test
- public void testRegistryContentForDeprecated_3027() {
- Assert.assertTrue("Deprecated (3027) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3027"));
+ public void testRegistryContentForPartAssociation_4001() {
+ Assert.assertTrue("PartAssociation_4001 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_4001"));
}
@Test
- public void testRegistryContentForDeprecated_3043() {
- Assert.assertTrue("Deprecated (3043) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3043"));
+ public void testRegistryContentForPartAssociation_4019() {
+ Assert.assertTrue("PartAssociation_4019 element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.PartAssociation_4019"));
}
- @Test
- public void testRegistryContentForDeprecated_3044() {
- Assert.assertTrue("Deprecated (3044) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3044"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_3045() {
- Assert.assertTrue("Deprecated (3045) element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.sysML.Deprecated_DataType_3045"));
- }
-
-
}
diff --git a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java
index c9e6afa0939..e5f80889a4d 100644
--- a/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java
+++ b/tests/junit/extraplugins/sysml14/org.eclipse.papyrus.sysml14.service.types.tests/src/org/eclipse/papyrus/sysml14/service/types/tests/SysML14ElementTypesTest.java
@@ -35,6 +35,7 @@ public class SysML14ElementTypesTest {
Assert.assertNotNull("The SysML 1.4 element type set definition is missing", elementTypeSetConfiguration);
}
+
@Test
public void testRegistryContentForValueType() {
Assert.assertTrue("ValueType element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.ValueType"));
@@ -401,39 +402,20 @@ public class SysML14ElementTypesTest {
}
@Test
- public void testRegistryContentForDeprecated_ValueSpecification() {
- Assert.assertTrue("Deprecated ValueSpecification element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_ValueSpecification"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_Property() {
- Assert.assertTrue("Deprecated Property element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Property"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_InstanceSpecification() {
- Assert.assertTrue("Deprecated InstanceSpecification element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_InstanceSpecification"));
- }
-
- @Test
- public void testRegistryContentForDeprecated_Class() {
- Assert.assertTrue("Deprecated Class element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Class"));
+ public void testRegistryContentForUnit() {
+ Assert.assertTrue("Unit element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Unit"));
}
@Test
- public void testRegistryContentForDeprecated_Association() {
- Assert.assertTrue("Deprecated Association element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Association"));
+ public void testRegistryContentForQuantityKind() {
+ Assert.assertTrue("QuantityKind element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.QuantityKind"));
}
@Test
- public void testRegistryContentForDeprecated_Generalization() {
- Assert.assertTrue("Deprecated Generalization element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_Generalization"));
+ public void testRegistryContentForPartAssociation() {
+ Assert.assertTrue("PartAssociation element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.PartAssociation"));
}
- @Test
- public void testRegistryContentForDeprecated_DataType() {
- Assert.assertTrue("Deprecated DataType element type not found in SysML element type set ", ElementEditServiceUtils.getEditServiceProvider().isKnownElementType("org.eclipse.papyrus.SysML14.Deprecated_DataType"));
- }
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch
index b95c58e8aa1..bab5742ef15 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/org.eclipse.papyrus.uml.diagram.sequence.tests.launch
@@ -1,42 +1,43 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bad_container_name" value="\org.eclipse.papyrus.uml.diagram.sequence.tests\junit.launcher"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-sequence-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.sequence.tests"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx2048m -XX:MaxPermSize=2048m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bad_container_name" value="\org.eclipse.papyrus.uml.diagram.sequence.tests\junit.launcher"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-sequence-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.uml.diagram.sequence.tests/src/org/eclipse/papyrus/uml/diagram/sequence/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.diagram.sequence.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.diagram.sequence.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx2048m -XX:MaxPermSize=2048m&#10;-Doomph.setup.skip=true"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF
index ea6915851c2..8cb8b843601 100644..100755
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/META-INF/MANIFEST.MF
@@ -1,6 +1,5 @@
Manifest-Version: 1.0
-Require-Bundle: org.junit;bundle-version="4.8.1",
- org.eclipse.uml2.uml;bundle-version="3.1.0",
+Require-Bundle: org.eclipse.uml2.uml;bundle-version="3.1.0",
org.eclipse.papyrus.uml.diagram.wizards;bundle-version="1.1.0",
org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.1.0",
org.eclipse.papyrus.sysml.diagram.ui;bundle-version="1.1.0",
@@ -11,8 +10,12 @@ Require-Bundle: org.junit;bundle-version="4.8.1",
org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
- org.eclipse.papyrus.junit.utils;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.uml.diagram.wizards
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.wizards,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime;bundle-version="3.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.junit;bundle-version="4.11.0"
Bundle-Vendor: %providerName
Bundle-Version: 1.1.0.qualifier
Bundle-Name: %pluginName
@@ -20,4 +23,5 @@ Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.wizards.tests
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.eclipse.papyrus.uml.diagram.wizards
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java
index 861d204eba3..04f2405f8c7 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelFromExistingModelWizard.java
@@ -24,21 +24,25 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.uml.diagram.wizards.messages.Messages;
import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectRootElementPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWizard;
import org.junit.Assert;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBase {
- //This test only covers the creation of the wizard and check if the first page contain the expected file name
+ // This test only covers the creation of the wizard and check if the first page contain the expected file name
private static IProject createProject;
private static IFile file, fileWithDot;
@@ -82,7 +86,7 @@ public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBa
isInitFromExistingDomainModel = isSupportedDomainModelResource(uri);
super.init(workbench, selection);
selectRootElementPage = createSelectRootElementPage(selection);
- if(isCreateFromExistingDomainModel()) {
+ if (isCreateFromExistingDomainModel()) {
// Init Model not Create a new one
setWindowTitle(Messages.InitModelWizard_init_papyrus_diagram);
}
@@ -97,10 +101,11 @@ public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBa
}
-
+ @Ignore
@Test
public void testOrderOfPages() {
- Class<?>[] expectedPages = new Class[]{ NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, SelectRootElementPage.class };
+ Class<?>[] expectedPages = new Class[] { SelectStorageProviderPage.class, SelectDiagramCategoryPage.class, NewModelFilePage.class, SelectDiagramKindPage.class };
+ // Class<?>[] expectedPages = new Class[]{ NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, SelectRootElementPage.class };
IWorkbenchWizard wizard = initWizardDialog();
testOrderOfPages(wizard, expectedPages);
@@ -120,7 +125,7 @@ public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBa
isInitFromExistingDomainModel = isSupportedDomainModelResource(uri);
super.init(workbench, selection);
selectRootElementPage = createSelectRootElementPage(selection);
- if(isCreateFromExistingDomainModel()) {
+ if (isCreateFromExistingDomainModel()) {
// Init Model not Create a new one
setWindowTitle(Messages.InitModelWizard_init_papyrus_diagram);
}
@@ -152,7 +157,7 @@ public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBa
isInitFromExistingDomainModel = isSupportedDomainModelResource(uri);
super.init(workbench, selection);
selectRootElementPage = createSelectRootElementPage(selection);
- if(isCreateFromExistingDomainModel()) {
+ if (isCreateFromExistingDomainModel()) {
// Init Model not Create a new one
setWindowTitle(Messages.InitModelWizard_init_papyrus_diagram);
}
@@ -166,7 +171,7 @@ public class TestCreateModelFromExistingModelWizard extends TestNewModelWizardBa
initWizardDialog(wizard);
NewModelFilePage page = getPage(wizard, NewModelFilePage.class);
assertNotSame("model.model.di", page.getFileName());
- //this should be fixed in the wizard to have the right name from the begining if the name contain a dot
+ // this should be fixed in the wizard to have the right name from the begining if the name contain a dot
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelWizard.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelWizard.java
index 300edd8b5d1..bd858a8ba62 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelWizard.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestCreateModelWizard.java
@@ -19,7 +19,10 @@ import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
import org.eclipse.ui.IWorkbenchWizard;
+import org.junit.Ignore;
import org.junit.Test;
@@ -37,9 +40,11 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
};
}
+ @Ignore
@Test
public void testOrderOfPages() {
- Class<?>[] expectedPages = new Class[]{ NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, };
+ Class<?>[] expectedPages = new Class[] { SelectStorageProviderPage.class, SelectDiagramCategoryPage.class, NewModelFilePage.class, SelectDiagramKindPage.class };
+ // Class<?>[] expectedPages = new Class[] { NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, };
IWorkbenchWizard wizard = initWizardDialog();
testOrderOfPages(wizard, expectedPages);
@@ -67,7 +72,7 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
assertEquals(expectedExtension, page.getFileExtension());
}
- @Test
+ // This test isnt revelent
public void testDiagramFileExtenstionForProfile() {
final String expectedExtension = "profile.di";
InitModelWizard wizard = new InitModelWizard() {
@@ -79,16 +84,18 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
@Override
protected String[] getDiagramCategoryIds() {
- return new String[]{ CreateProfileModelCommand.COMMAND_ID };
+ return new String[] { CreateProfileModelCommand.COMMAND_ID };
}
};
// ensure that the dialog would create a profile
- settings.saveDefaultDiagramCategory(new String[]{ "profile" });
+ // settings.saveDefaultDiagramCategory(new String[]{ "profile" });
initWizardDialog(wizard);
NewModelFilePage page = getPage(wizard, NewModelFilePage.class);
+ // we force the validation of the category page to change the name of the file
+ getPage(wizard, SelectDiagramCategoryPage.class).canFlipToNextPage();
assertEquals(expectedExtension, page.getFileExtension());
}
@@ -104,7 +111,7 @@ public class TestCreateModelWizard extends TestNewModelWizardBase {
@Override
protected String[] getDiagramCategoryIds() {
- return new String[]{ "uml" };
+ return new String[] { "uml" };
}
};
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestInitModelWizard.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestInitModelWizard.java
index 5f9306be071..ea85bec118c 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestInitModelWizard.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestInitModelWizard.java
@@ -19,8 +19,11 @@ import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
import org.eclipse.papyrus.uml.diagram.wizards.pages.NewModelFilePage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
-import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectRootElementPage;
+//import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectRootElementPage;
+import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard;
import org.eclipse.ui.IWorkbenchWizard;
+import org.junit.Ignore;
import org.junit.Test;
@@ -40,7 +43,7 @@ public class TestInitModelWizard extends TestNewModelWizardBase {
@Override
protected String[] getDiagramCategoryIds() {
- return new String[]{ "uml" };
+ return new String[] { "uml" };
}
@Override
@@ -73,9 +76,11 @@ public class TestInitModelWizard extends TestNewModelWizardBase {
assertEquals(expectedExtension, page.getFileExtension());
}
+ @Ignore
@Test
public void testOrderOfPages() {
- Class<?>[] expectedPages = new Class[]{ NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, SelectRootElementPage.class, };
+ Class<?>[] expectedPages = new Class[] { SelectStorageProviderPage.class, SelectDiagramCategoryPage.class, NewModelFilePage.class, SelectDiagramKindPage.class };
+ // Class<?>[] expectedPages = new Class[]{ NewModelFilePage.class, SelectDiagramCategoryPage.class, SelectDiagramKindPage.class, SelectRootElementPage.class, };
IWorkbenchWizard wizard = initWizardDialog();
testOrderOfPages(wizard, expectedPages);
@@ -100,13 +105,13 @@ public class TestInitModelWizard extends TestNewModelWizardBase {
@Override
protected String[] getDiagramCategoryIds() {
- return new String[]{ CreateProfileModelCommand.COMMAND_ID };
+ return new String[] { CreateProfileModelCommand.COMMAND_ID };
}
};
// ensure that the dialog would create a profile
- settings.saveDefaultDiagramCategory(new String[]{ "profile" });
+ // settings.saveDefaultDiagramCategory(new String[]{ "profile" });
initWizardDialog(wizard);
NewModelFilePage page = getPage(wizard, NewModelFilePage.class);
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewModelWizardBase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewModelWizardBase.java
index 0e2aa9832dd..b4b5a2c3d48 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewModelWizardBase.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewModelWizardBase.java
@@ -34,6 +34,7 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectStorageProviderPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
@@ -49,8 +50,6 @@ public abstract class TestNewModelWizardBase extends AbstractPapyrusTest {
protected static final IStructuredSelection EMPTY_SELECTION = StructuredSelection.EMPTY;
- protected SettingsHelper settings;
-
protected abstract IWorkbenchWizard createWizard();
private String settingsBackup;
@@ -109,11 +108,11 @@ public abstract class TestNewModelWizardBase extends AbstractPapyrusTest {
Class<?> optionalInitialPage = SelectStorageProviderPage.class;
IWizardPage next = wizard.getPages()[0];
- for(int i = 0; i < expectedPages.length; i++) {
+ for (int i = 0; i < expectedPages.length; i++) {
String isNullMessageFormat = "page %s expected, but actual is: null";
assertNotNull(String.format(isNullMessageFormat, i), next);
- if((optionalInitialPage != null) && (i == 0) && optionalInitialPage.isInstance(next)) {
+ if ((optionalInitialPage != null) && (i == 0) && optionalInitialPage.isInstance(next)) {
// we have tested the optional initial page; don't do it again
optionalInitialPage = null;
i--;
@@ -136,10 +135,9 @@ public abstract class TestNewModelWizardBase extends AbstractPapyrusTest {
private void initSettingsHelper() {
IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
IDialogSettings settings = workbenchSettings.getSection(CreateModelWizard.NEW_MODEL_SETTINGS);
- if(settings == null) {
+ if (settings == null) {
settings = workbenchSettings.addNewSection(CreateModelWizard.NEW_MODEL_SETTINGS);
}
- this.settings = new SettingsHelper(settings);
StringWriter backupWriter = new StringWriter();
try {
@@ -152,11 +150,11 @@ public abstract class TestNewModelWizardBase extends AbstractPapyrusTest {
}
private void restoreDialogSettings() {
- if(settingsBackup != null) {
+ if (settingsBackup != null) {
IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
IDialogSettings settings = workbenchSettings.getSection(CreateModelWizard.NEW_MODEL_SETTINGS);
- if(settings != null) {
- ((DialogSettings)workbenchSettings).removeSection(settings);
+ if (settings != null) {
+ ((DialogSettings) workbenchSettings).removeSection(settings);
settings = workbenchSettings.addNewSection(settings.getName());
try {
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewProjectWizard.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewProjectWizard.java
index 7e4ffca0b9e..d37ed5c71b9 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewProjectWizard.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests/test/org/eclipse/papyrus/uml/diagram/wizards/TestNewProjectWizard.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013, 2014 LIFL, CEA LIST, and others.
- *
+ *
* 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
@@ -9,12 +9,13 @@
* Contributors:
* LIFL - Initial API and implementation
* CEA LIST - Update tests and re-integrate into automation suite
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.wizards;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramCategoryPage;
import org.eclipse.papyrus.uml.diagram.wizards.pages.SelectDiagramKindPage;
+import org.eclipse.papyrus.uml.diagram.wizards.wizards.NewPapyrusProjectWizard;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
import org.junit.Test;
diff --git a/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java
index 1c4b7595518..8745d107654 100644
--- a/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java
+++ b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/AllTests.java
@@ -18,7 +18,9 @@ import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({
- ValueSpecificationGrammarTests.class
+ ValueSpecificationGrammarTests.class,
+ MultiplicityLowerValueSpecificationGrammarTests.class,
+ MultiplicityUpperValueSpecificationGrammarTests.class
})
public class AllTests {
// JUnit 4 Test Suite
diff --git a/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityLowerValueSpecificationGrammarTests.java b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityLowerValueSpecificationGrammarTests.java
new file mode 100644
index 00000000000..128e4fefa5a
--- /dev/null
+++ b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityLowerValueSpecificationGrammarTests.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.textedit.valuespecification.tests.suites;
+
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.textedit.tests.AbstractGrammarTest;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.LiteralInteger;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+@PluginResource("/model/xtextValueSpecificationModel.uml")
+public class MultiplicityLowerValueSpecificationGrammarTests extends AbstractGrammarTest<EStructuralFeature> {
+
+ /**
+ * The root model.
+ */
+ protected Model rootModel;
+
+ /**
+ * The tested property.
+ */
+ protected Property testedProperty;
+
+ @Before
+ public void loadTestModel() {
+ rootModel = findElement(Model.class, "model");
+
+ final Class createdClass = (Class) rootModel.createPackagedElement("Class1", UMLPackage.eINSTANCE.getClass_());
+ testedProperty = (Property) createdClass.createOwnedAttribute("Property", null, UMLPackage.eINSTANCE.getProperty());
+ }
+
+ @Test
+ public void testParser() throws Exception {
+
+ // Check literal integer (even if this is superior to 0
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE, "#unlimitedNatural=12");
+ Assert.assertEquals(VisibilityKind.PROTECTED_LITERAL, testedProperty.getLowerValue().getVisibility());
+ Assert.assertEquals("unlimitedNatural", testedProperty.getLowerValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getLiteralInteger(), testedProperty.getLowerValue().eClass());
+ Assert.assertEquals(12, ((LiteralInteger) testedProperty.getLowerValue()).getValue());
+
+ // Check the update of the LiteralInteger
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE, "--8");
+ Assert.assertEquals(VisibilityKind.PRIVATE_LITERAL, testedProperty.getLowerValue().getVisibility());
+ Assert.assertEquals("unlimitedNatural", testedProperty.getLowerValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getLiteralInteger(), testedProperty.getLowerValue().eClass());
+ Assert.assertEquals(-8, ((LiteralInteger) testedProperty.getLowerValue()).getValue());
+
+ // Check literal integer (even if this is superior to 0
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__LOWER_VALUE, "+integer=*");
+ Assert.assertEquals(VisibilityKind.PRIVATE_LITERAL, testedProperty.getLowerValue().getVisibility());
+ Assert.assertEquals("+integer=*", testedProperty.getLowerValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getOpaqueExpression(), testedProperty.getLowerValue().eClass());
+
+ }
+
+ @Override
+ public DefaultXtextDirectEditorConfiguration getEditor() {
+ return new MultiplicityLowerValueSpecificationXtextDirectEditorConfiguration();
+ }
+}
diff --git a/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityUpperValueSpecificationGrammarTests.java b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityUpperValueSpecificationGrammarTests.java
new file mode 100644
index 00000000000..ca4d35fd837
--- /dev/null
+++ b/tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.tests/src/org/eclipse/papyrus/uml/textedit/valuespecification/tests/suites/MultiplicityUpperValueSpecificationGrammarTests.java
@@ -0,0 +1,81 @@
+/*****************************************************************************
+ * Copyright (c) 2015 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:
+ * Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.textedit.valuespecification.tests.suites;
+
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.textedit.tests.AbstractGrammarTest;
+import org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.contribution.MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration;
+import org.eclipse.papyrus.uml.xtext.integration.DefaultXtextDirectEditorConfiguration;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.LiteralUnlimitedNatural;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.VisibilityKind;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+@PluginResource("/model/xtextValueSpecificationModel.uml")
+public class MultiplicityUpperValueSpecificationGrammarTests extends AbstractGrammarTest<EStructuralFeature> {
+
+ /**
+ * The root model.
+ */
+ protected Model rootModel;
+
+ /**
+ * The tested property.
+ */
+ protected Property testedProperty;
+
+ @Before
+ public void loadTestModel() {
+ rootModel = findElement(Model.class, "model");
+
+ final Class createdClass = (Class) rootModel.createPackagedElement("Class1", UMLPackage.eINSTANCE.getClass_());
+ testedProperty = (Property) createdClass.createOwnedAttribute("Property", null, UMLPackage.eINSTANCE.getProperty());
+ }
+
+ @Test
+ public void testParser() throws Exception {
+
+ // Check literal integer (even if this is superior to 0
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__UPPER_VALUE, "#unlimitedNatural=12");
+ Assert.assertEquals(VisibilityKind.PROTECTED_LITERAL, testedProperty.getUpperValue().getVisibility());
+ Assert.assertEquals("unlimitedNatural", testedProperty.getUpperValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getLiteralUnlimitedNatural(), testedProperty.getUpperValue().eClass());
+ Assert.assertEquals(12, ((LiteralUnlimitedNatural) testedProperty.getUpperValue()).getValue());
+
+ // Check the update of the LiteralInteger
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__UPPER_VALUE, "*");
+ Assert.assertEquals(VisibilityKind.PROTECTED_LITERAL, testedProperty.getUpperValue().getVisibility());
+ Assert.assertEquals("unlimitedNatural", testedProperty.getUpperValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getLiteralUnlimitedNatural(), testedProperty.getUpperValue().eClass());
+ Assert.assertEquals(-1, ((LiteralUnlimitedNatural) testedProperty.getUpperValue()).getValue());
+
+ // Check literal integer (even if this is superior to 0
+ tester.parseText(testedProperty, UMLPackage.Literals.MULTIPLICITY_ELEMENT__UPPER_VALUE, "-integer=-8");
+ Assert.assertEquals(VisibilityKind.PROTECTED_LITERAL, testedProperty.getUpperValue().getVisibility());
+ Assert.assertEquals("-integer=-8", testedProperty.getUpperValue().getName());
+ Assert.assertEquals(UMLPackage.eINSTANCE.getOpaqueExpression(), testedProperty.getUpperValue().eClass());
+
+ }
+
+ @Override
+ public DefaultXtextDirectEditorConfiguration getEditor() {
+ return new MultiplicityUpperValueSpecificationXtextDirectEditorConfiguration();
+ }
+}

Back to the top